Luxembourgish OCR in C# and .NET
Inne wersje tego dokumentu:
IronOCR to komponent programistyczny C# pozwalajacy programistom .NET odczytywac tekst z obrazow i dokumentow PDF w 126 językach, 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
- LuksemburskiNajlepszy
- LuksemburskiSzybki
Pobieranie
Luxembourgish Language Pack [Lëtzebuergesch]
Instalacja
Pierwsza rzecza, która 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 języku 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
- Ten przyklad demonstruje uzycie IronOCR do rozpoznawania tekstu w języku luksemburskim z lokalnych dokumentow.
- Jezyk jest ustawiony na luksemburski, aby zwiekszyc dokladnosc rozpoznawania tekstow w tym języku.
OcrInput()służy do określenia obrazu wejściowego lub pliku PDF.Ocr.Read()przetwarza dokument, a dostęp do rozpoznanego tekstu uzyskuje się za pośrednictwemResult.Text.

