Mongolian OCR in C# and .NET
Other versions of this document:
IronOCR is a C# software component allowing .NET coders to read text from images and PDF documents in 126 languages, including Mongolian.
It is an advanced fork of Tesseract, built exclusively for .NET developers and regularly outperforms other Tesseract engines in both speed and accuracy.
Contents of IronOcr.Languages.Mongolian
This package contains 52 OCR languages for .NET:
- Mongolian
- MongolianBest
- MongolianFast
Download
Mongolian Language Pack [монгол]
Installation
The first step is to install the Mongolian OCR package in your .NET project.
Install-Package IronOCR.Languages.Mongolian
Code Example
This C# code example reads Mongolian text from an image or PDF document.
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of IronTesseract
var Ocr = new IronTesseract();
// Set the language to Mongolian
Ocr.Language = OcrLanguage.Mongolian;
// Define the input as an image located in the "images" directory
using (var Input = new OcrInput(@"images\Mongolian.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Output the recognized text to the console
Console.WriteLine(AllText);
}
}
}
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of IronTesseract
var Ocr = new IronTesseract();
// Set the language to Mongolian
Ocr.Language = OcrLanguage.Mongolian;
// Define the input as an image located in the "images" directory
using (var Input = new OcrInput(@"images\Mongolian.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Output the recognized text to the console
Console.WriteLine(AllText);
}
}
}
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create a new instance of IronTesseract
Dim Ocr = New IronTesseract()
' Set the language to Mongolian
Ocr.Language = OcrLanguage.Mongolian
' Define the input as an image located in the "images" directory
Using Input = New OcrInput("images\Mongolian.png")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Extract all recognized text
Dim AllText = Result.Text
' Output the recognized text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class
This example demonstrates how to use IronOCR to perform Optical Character Recognition on a Mongolian text image. It initializes the OCR engine, sets the language, and processes the image input to retrieve and display the recognized text.