Luxembourgish 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 programistyczny C# pozwalajacy programistom .NET odczytywac tekst z obrazow i dokumentow PDF w 126 jezykach, w tym w jezyku luksemburskim.

Jest to zaawansowany fork Tesseract, stworzony wyłącznie dla programistów .NET i regularnie przewyższa inne silniki Tesseract zarówno pod względem szybkości, jak i dokładności.

Zawartosc IronOcr.Languages.Luxembourgish

Ten pakiet zawiera 64 języki OCR dla .NET:

  • Luksemburski
  • LuxembourgishBest
  • LuxembourgishFast

Pobieranie

Luxembourgish Language Pack [Lëtzebuergesch]

Instalacja

Pierwsza rzecza, ktora musimy zrobic, jest zainstalowanie pakietu OCR dla luksemburskiego w Twoim projekcie .NET.

Install-Package IronOcr.Languages.Luxembourgish

Przyklad kodu

Ten przyklad kodu C# odczytuje tekst w jezyku luksemburskim z obrazu lub dokumentu PDF.

// Import the IronOcr namespace to utilize OCR functions
using IronOcr;

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

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

        // Load the input image or PDF from which to extract the text
        using (var Input = new OcrInput(@"images\Luxembourgish.png"))
        {
            // Perform OCR on the input document
            var Result = Ocr.Read(Input);

            // Retrieve the recognized text from the result
            var AllText =  Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
// Import the IronOcr namespace to utilize OCR functions
using IronOcr;

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

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

        // Load the input image or PDF from which to extract the text
        using (var Input = new OcrInput(@"images\Luxembourgish.png"))
        {
            // Perform OCR on the input document
            var Result = Ocr.Read(Input);

            // Retrieve the recognized text from the result
            var AllText =  Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
' Import the IronOcr namespace to utilize OCR functions
Imports IronOcr

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

		' Set the language for OCR to Luxembourgish
		Ocr.Language = OcrLanguage.Luxembourgish

		' Load the input image or PDF from which to extract the text
		Using Input = New OcrInput("images\Luxembourgish.png")
			' Perform OCR on the input document
			Dim Result = Ocr.Read(Input)

			' Retrieve the recognized text from the result
			Dim AllText = Result.Text

			' Output the recognized text
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel
  • Ten przyklad demonstruje uzycie IronOCR do rozpoznawania tekstu w jezyku luksemburskim z lokalnych dokumentow.
  • Jezyk jest ustawiony na luksemburski, aby zwiekszyc dokladnosc rozpoznawania tekstow w tym jezyku.
  • OcrInput() jest uzywany do okreslenia obrazu wejsciowego lub pliku PDF.
  • Ocr.Read() przetwarza dokument, a rozpoznany tekst jest dostepny za posrednictwem Result.Text.