Hebrew OCR in C# and .NET
Inne wersje tego dokumentu:
IronOCR to komponent oprogramowania C#, który pozwala programistom .NET odczytywać tekst z obrazów i dokumentów PDF w 126 językach, w tym w hebrajskim.
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.Hebrew
Pakiet ten zawiera 108 języków OCR dla .NET:
- Hebrew
- HebrewBest
- HebrewFast
- HebrewAlphabet
- HebrewAlphabetBest
- HebrewAlphabetFast
Pobieranie
Hebrew Language Pack [עברית]
Instalacja
Pierwszą rzeczą, którą musimy zrobić, jest zainstalowanie naszego pakietu OCR Hebrew w Twoim projekcie .NET.
Install-Package IronOcr.Languages.Hebrew
Przyklad kodu
Ten przykład kodu C# odczytuje tekst hebrajski z obrazu lub dokumentu PDF.
// Include the IronOcr namespace to work with OCR features
using IronOcr;
// Create an OCR engine
var Ocr = new IronTesseract();
// Set the OCR engine language to Hebrew
Ocr.Language = OcrLanguage.Hebrew;
// Process the image and extract text using OCR
using (var Input = new OcrInput(@"images\Hebrew.png"))
{
// Read the text from the input image
var Result = Ocr.Read(Input);
// Store the extracted text
var AllText = Result.Text;
// Output the extracted text to the console (optional)
Console.WriteLine(AllText);
}
// Include the IronOcr namespace to work with OCR features
using IronOcr;
// Create an OCR engine
var Ocr = new IronTesseract();
// Set the OCR engine language to Hebrew
Ocr.Language = OcrLanguage.Hebrew;
// Process the image and extract text using OCR
using (var Input = new OcrInput(@"images\Hebrew.png"))
{
// Read the text from the input image
var Result = Ocr.Read(Input);
// Store the extracted text
var AllText = Result.Text;
// Output the extracted text to the console (optional)
Console.WriteLine(AllText);
}
' Include the IronOcr namespace to work with OCR features
Imports IronOcr
' Create an OCR engine
Private Ocr = New IronTesseract()
' Set the OCR engine language to Hebrew
Ocr.Language = OcrLanguage.Hebrew
' Process the image and extract text using OCR
Using Input = New OcrInput("images\Hebrew.png")
' Read the text from the input image
Dim Result = Ocr.Read(Input)
' Store the extracted text
Dim AllText = Result.Text
' Output the extracted text to the console (optional)
Console.WriteLine(AllText)
End Using
- IronTesseract: Ta klasa jest używana do inicjalizacji silnika OCR.
- OcrInput: Reprezentuje obraz lub dokument źródłowy, który silnik OCR będzie odczytywał.
- Ocr.Read: Ta metoda przetwarza wejście i zwraca wynik zawierający wyodrębniony tekst.
- Result.Text: Przechowuje wyodrębniony tekst, który można wykorzystać do dalszego przetwarzania.

