Lithuanian 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 w C#, pozwalający programistom .NET odczytywać tekst z obrazów i dokumentów PDF w 126 językach, w tym po litewsku.

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.Lithuanian

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

  • Litewski
  • LithuanianBest
  • LithuanianFast

Pobieranie

Lithuanian Language Pack [lietuvių kalba]

Instalacja

Pierwszą rzeczą, którą musimy zrobić, jest zainstalowanie naszego pakietu OCR Litewski do projektu .NET.

Install-Package IronOcr.Languages.Lithuanian

Przyklad kodu

Ten przykład kodu C# odczytuje litewski tekst z obrazu lub dokumentu PDF.

// Include the IronOcr namespace to use OCR features
using IronOcr;

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

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

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

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

            // For demonstration purposes, output the extracted text to the console
            Console.WriteLine(AllText);
        }
    }
}
// Include the IronOcr namespace to use OCR features
using IronOcr;

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

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

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

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

            // For demonstration purposes, output the extracted text to the console
            Console.WriteLine(AllText);
        }
    }
}
' Include the IronOcr namespace to use OCR features
Imports IronOcr

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

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

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

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

			' For demonstration purposes, output the extracted text to the console
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel