Filipino OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English

另外 126 種語言

IronOCR是一個C#軟體組件,允許.NET開發人員從影像和PDF文件中讀取126種語言的文本,包括菲律賓語。它是Tesseract的一個先進分支,專門為.NET開發人員而構建,並且經常在速度和準確性上勝過其他Tesseract引擎。

IronOcr.Languages.Filipino的內容

該套件包含 49 種 .NET 的 OCR 語言:

  • 菲律賓語
  • 菲律賓語最佳版
  • 菲律賓語快速版

下載

菲律賓語語言包 style='white-space:default'>[菲律賓的國家語言]

安裝

我們首先需要做的是將我們的菲律賓語OCR包安裝到您的.NET項目中。

Install-Package IronOCR.Languages.Filipino

代碼示例

這個C#代碼範例從圖像或PDF文檔中讀取菲律賓語文本。

// Import the IronOcr namespace to use its classes and methods.
using IronOcr;

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

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

        // Create a new OcrInput object, specifying the path to the image
        // or document that contains the text you want to read.
        using (var Input = new OcrInput(@"images\Filipino.png"))
        {
            // Perform OCR on the input.
            var Result = Ocr.Read(Input);

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

            // Output the text to the console or use it in your application.
            Console.WriteLine(AllText);
        }
    }
}
// Import the IronOcr namespace to use its classes and methods.
using IronOcr;

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

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

        // Create a new OcrInput object, specifying the path to the image
        // or document that contains the text you want to read.
        using (var Input = new OcrInput(@"images\Filipino.png"))
        {
            // Perform OCR on the input.
            var Result = Ocr.Read(Input);

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

            // Output the text to the console or use it in your application.
            Console.WriteLine(AllText);
        }
    }
}
' Import the IronOcr namespace to use its classes and methods.
Imports IronOcr

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

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

		' Create a new OcrInput object, specifying the path to the image
		' or document that contains the text you want to read.
		Using Input = New OcrInput("images\Filipino.png")
			' Perform OCR on the input.
			Dim Result = Ocr.Read(Input)

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

			' Output the text to the console or use it in your application.
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel