OCR luxemburgués 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 en C# que permite a los programadores de .NET leer texto de imágenes y documentos PDF en 126 idiomas, incluido el luxemburgués.

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

Contenido de IronOcr.Languages.Luxembourgish

Este paquete contiene 64 idiomas OCR para .NET:

  • Luxemburgués
  • LuxemburguésBest
  • LuxemburguésRápido

Descargar

Paquete de Idioma Luxemburgués [Lëtzebuergesch]

Instalación

Lo primero que tenemos que hacer es instalar el paquete OCR Luxemburgués en tu proyecto .NET.

Install-Package IronOCR.Languages.Luxembourgish

Ejemplo de código

Este ejemplo de código C# lee texto en luxemburgués desde una imagen o documento 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
  • Este ejemplo demuestra el uso de IronOCR para reconocer texto luxemburgués en documentos locales.
  • El idioma se establece a luxemburgués para mejorar la precisión del reconocimiento de textos en ese idioma.
  • OcrInput() se utiliza para especificar la imagen de entrada o el archivo PDF.
  • Ocr.Read() procesa el documento, y el texto reconocido se accede a través de Result.Text.