Hebrew OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Outras versões deste documento:

IronOCR é um componente de software em C# que permite aos programadores .NET ler texto de imagens e documentos PDF em 126 idiomas, incluindo Hebraico.

Trata-se de uma versão avançada do Tesseract, criada exclusivamente para desenvolvedores .NET e que supera regularmente outros mecanismos do Tesseract em termos de velocidade e precisão.

Conteúdos de IronOcr.Languages.Hebrew

Este pacote contém 108 linguagens OCR for .NET:

  • Hebraico
  • HebraicoMelhor
  • HebraicoRápido
  • AlfabetoHebraico
  • AlfabetoMelhorHebraico
  • AlfabetoRápidoHebraico

Baixar

Pacote de Idioma Hebraico [עברית]

Instalação

A primeira coisa que temos que fazer é instalar nosso pacote OCR de Hebraico no seu projeto .NET.

Install-Package IronOcr.Languages.Hebrew

Exemplo de código

Este exemplo de código C# lê texto em Hebraico de uma Imagem ou documento 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);
}
$vbLabelText   $csharpLabel
  • IronTesseract: Esta classe é usada para inicializar o mecanismo de OCR.
  • OcrInput: Este representa a imagem ou documento de entrada que o motor de OCR irá ler.
  • Ocr.Read: Este método processa a entrada e retorna o resultado contendo o texto extraído.
  • Result.Text: Armazena o texto extraído que pode ser usado para processamento adicional.