Belarusian OCR in C# and .NET

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

IronOCR to komponent oprogramowania C#, który umożliwia programistom .NET odczytywanie tekstu z obrazów i dokumentów PDF w 126 językach, w tym po białorusku.

Jest to zaawansowany fork Tesseracta, zbudowany wyłącznie dla deweloperów .NET i regularnie przewyższający inne silniki Tesseract pod względem szybkości i dokładności.

Zawartość IronOcr.Languages.Belarusian

Ten pakiet zawiera 55 języków OCR dla .NET:

  • Białoruski
  • BiałoruskiNajlepszy
  • BiałoruskiSzybki

Pobieranie

Belarusian Language Pack [беларуская мова]

Instalacja

Pierwszą rzeczą, którą musimy zrobić, to zainstalować nasz pakiet OCR Białoruski w twoim projekcie .NET.

Install-Package IronOcr.Languages.Belarusian

Przyklad kodu

Ten przykład kodu C# odczytuje tekst białoruski z obrazu lub dokumentu 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