Myanmar OCR in C# and .NET

126 More Languages

IronOCR is a C# software component allowing .NET developers to read text from images and PDF documents in 126 languages, including Myanmar. It is an advanced fork of Tesseract, built exclusively for .NET developers and regularly outperforms other Tesseract engines for both speed and accuracy.

Contents of IronOcr.Languages.Myanmar

This package contains OCR support for 114 languages specific to Myanmar:

  • Myanmar
  • MyanmarBest
  • MyanmarFast
  • MyanmarAlphabet
  • MyanmarAlphabetBest
  • MyanmarAlphabetFast

Download

Myanmar Language Pack [Burmese]

Installation

First, install the Myanmar OCR package into your .NET project via NuGet:

Install-Package IronOCR.Languages.Myanmar

Code Example

This C# code example reads Myanmar text from an image or PDF document.

// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Initialize the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the OCR language to Myanmar
        Ocr.Language = OcrLanguage.Myanmar;

        // Define input source - image or PDF containing Myanmar text
        using (var Input = new OcrInput(@"images\Myanmar.png"))
        {
            // Perform OCR on the input and obtain the result
            var Result = Ocr.Read(Input);

            // Extract the recognized text from the OCR result
            var AllText = Result.Text;

            // Output the recognized Myanmar text
            Console.WriteLine(AllText);
        }
    }
}
// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Initialize the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the OCR language to Myanmar
        Ocr.Language = OcrLanguage.Myanmar;

        // Define input source - image or PDF containing Myanmar text
        using (var Input = new OcrInput(@"images\Myanmar.png"))
        {
            // Perform OCR on the input and obtain the result
            var Result = Ocr.Read(Input);

            // Extract the recognized text from the OCR result
            var AllText = Result.Text;

            // Output the recognized Myanmar text
            Console.WriteLine(AllText);
        }
    }
}
' Import the IronOcr namespace
Imports IronOcr

Friend Class Program
	Shared Sub Main()
		' Initialize the IronTesseract OCR engine
		Dim Ocr = New IronTesseract()

		' Set the OCR language to Myanmar
		Ocr.Language = OcrLanguage.Myanmar

		' Define input source - image or PDF containing Myanmar text
		Using Input = New OcrInput("images\Myanmar.png")
			' Perform OCR on the input and obtain the result
			Dim Result = Ocr.Read(Input)

			' Extract the recognized text from the OCR result
			Dim AllText = Result.Text

			' Output the recognized Myanmar text
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel

Explanation

  • IronTesseract: This is the main class provided by the IronOCR library that handles OCR tasks.
  • Ocr.Language: Sets the language for OCR; this example is set to OcrLanguage.Myanmar.
  • OcrInput: Used to specify the input source, which could be an image or PDF file.
  • Ocr.Read: Performs the OCR process and returns an OcrResult object.
  • Result.Text: Contains the extracted text from the image or PDF document.