Malay OCR in C# and .NET

126 More Languages

IronOCR is a C# software component allowing .NET coders to read text from images and PDF documents in 126 languages, including Malay.

It is an advanced fork of Tesseract, built exclusively for .NET developers and regularly outperforms other Tesseract engines in terms of speed and accuracy.

Contents of IronOcr.Languages.Malay

This package contains 40 OCR languages for .NET:

  • Malay
  • MalayBest
  • MalayFast

Download

Malay Language Pack [bahasa Melayu]

Installation

The first thing we have to do is install our Malay OCR package in your .NET project.

Install-Package IronOCR.Languages.Malay

Code Example

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

// This example demonstrates how to read Malay text using IronOcr.

using IronOcr;

class Program
{
    static void Main()
    {
        // Create a new instance of the IronTesseract class
        var Ocr = new IronTesseract();

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

        // Use a using statement to ensure the OcrInput is properly disposed of
        using (var Input = new OcrInput(@"images\Malay.png"))
        {
            // Perform OCR on the input image
            var Result = Ocr.Read(Input);

            // Extract and store the recognized text from the OCR result
            string AllText = Result.Text;

            // Output the recognized text (optional)
            Console.WriteLine(AllText);
        }
    }
}
// This example demonstrates how to read Malay text using IronOcr.

using IronOcr;

class Program
{
    static void Main()
    {
        // Create a new instance of the IronTesseract class
        var Ocr = new IronTesseract();

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

        // Use a using statement to ensure the OcrInput is properly disposed of
        using (var Input = new OcrInput(@"images\Malay.png"))
        {
            // Perform OCR on the input image
            var Result = Ocr.Read(Input);

            // Extract and store the recognized text from the OCR result
            string AllText = Result.Text;

            // Output the recognized text (optional)
            Console.WriteLine(AllText);
        }
    }
}
' This example demonstrates how to read Malay text using IronOcr.

Imports IronOcr

Friend Class Program
	Shared Sub Main()
		' Create a new instance of the IronTesseract class
		Dim Ocr = New IronTesseract()

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

		' Use a using statement to ensure the OcrInput is properly disposed of
		Using Input = New OcrInput("images\Malay.png")
			' Perform OCR on the input image
			Dim Result = Ocr.Read(Input)

			' Extract and store the recognized text from the OCR result
			Dim AllText As String = Result.Text

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