Belarusian OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Other versions of this document:

IronOCR 是一個 C# 軟體組件,允許 .NET 程式員從圖像和 PDF 文件中讀取包含白俄羅斯語在內的 126 種語言的文本。

它是一個專為 .NET 開發者設計的 Tesseract 高級分支,在速度和準確性方面經常優於其他 Tesseract 引擎。

IronOcr.Languages.Belarusian 的內容

此套件包含 55 種 .NET OCR 語言:

  • 白俄羅斯語
  • 白俄羅斯語最佳
  • 白俄羅斯語快速

下載

白俄羅斯語語言包 style='white-space:normal'>[беларуск�ая мова]

安裝

我們要做的第一件事是將我們的 白俄羅斯語 OCR 套件安裝到您的 .NET 專案中。

Install-Package IronOCR.Languages.Belarusian

代碼示例

這個 C# 代碼範例從圖像或 PDF 文件中讀取白俄羅斯語文本。

// Import the IronOcr namespace to access OCR functionalities
using IronOcr;

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

        // Set the language to Belarusian for optimal recognition results
        Ocr.Language = OcrLanguage.Belarusian;

        // Define the input source: Image or PDF from a path
        using (var Input = new OcrInput(@"images\Belarusian.png"))
        {
            // Perform OCR to read the text
            var Result = Ocr.Read(Input);

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

            // Output the recognized text to the console
            System.Console.WriteLine(AllText);
        }
    }
}
// Import the IronOcr namespace to access OCR functionalities
using IronOcr;

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

        // Set the language to Belarusian for optimal recognition results
        Ocr.Language = OcrLanguage.Belarusian;

        // Define the input source: Image or PDF from a path
        using (var Input = new OcrInput(@"images\Belarusian.png"))
        {
            // Perform OCR to read the text
            var Result = Ocr.Read(Input);

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

            // Output the recognized text to the console
            System.Console.WriteLine(AllText);
        }
    }
}
' Import the IronOcr namespace to access OCR functionalities
Imports IronOcr

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

		' Set the language to Belarusian for optimal recognition results
		Ocr.Language = OcrLanguage.Belarusian

		' Define the input source: Image or PDF from a path
		Using Input = New OcrInput("images\Belarusian.png")
			' Perform OCR to read the text
			Dim Result = Ocr.Read(Input)

			' Extract the recognized text
			Dim AllText = Result.Text

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