OCR hebreo en C# y .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Other versions of this document:

IronOCR es un componente de software de C# que permite a los programadores de .NET leer texto de imágenes y documentos PDF en 126 idiomas, incluyendo hebreo.

Es una rama avanzada de Tesseract, construida exclusivamente para desarrolladores de .NET y supera regularmente a otros motores de Tesseract tanto en velocidad como en precisión.

Contenido de IronOcr.Languages.Hebrew

Este paquete contiene 108 idiomas de OCR para .NET:

  • Hebreo
  • HebreoMejor
  • HebreoRápido
  • AlfabetoHebreo
  • AlfabetoHebreoMejor
  • AlfabetoHebreoRápido

Descargar

Paquete de idioma hebreo [עברית]

Instalación

Lo primero que debemos hacer es instalar nuestro paquete de OCR Hebreo en su proyecto .NET.

Install-Package IronOCR.Languages.Hebrew

Ejemplo de código

Este ejemplo de código en C# lee texto en hebreo de una imagen o 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);
}
' 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
$vbLabelText   $csharpLabel
  • IronTesseract: Esta clase se utiliza para inicializar el motor de OCR.
  • OcrInput: Esto representa la imagen o documento de entrada que el motor de OCR leerá.
  • Ocr.Read: Este método procesa la entrada y devuelve el resultado que contiene el texto extraído.
  • Result.Text: Almacena el texto extraído que se puede usar para un procesamiento adicional.