OCR irlandé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 irlandés.

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.Irish

Este paquete contiene 40 idiomas OCR para .NET:

  • Irlandés
  • IrishBest
  • IrishFast

Descargar

Paquete de idioma irlandés [Gaeilge]

Instalación

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

Install-Package IronOCR.Languages.Irish

Ejemplo de código

Este ejemplo de código en C# lee texto en irlandés de una imagen o documento PDF.

// Install the IronOCR Irish language package via NuGet:
// PM> Install-Package IronOCR.Languages.Irish

using IronOcr;

class IrishOcrExample
{
    static void Main()
    {
        // Create a new instance of the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the language to Irish for OCR processing
        Ocr.Language = OcrLanguage.Irish;

        // Using the OCR input, specify the path to the image containing Irish text
        using (var Input = new OcrInput(@"images\Irish.png"))
        {
            // Perform OCR to read the Irish text from the image
            var Result = Ocr.Read(Input);

            // Get the recognized text as a string from the OCR result
            var AllText = Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
// Install the IronOCR Irish language package via NuGet:
// PM> Install-Package IronOCR.Languages.Irish

using IronOcr;

class IrishOcrExample
{
    static void Main()
    {
        // Create a new instance of the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the language to Irish for OCR processing
        Ocr.Language = OcrLanguage.Irish;

        // Using the OCR input, specify the path to the image containing Irish text
        using (var Input = new OcrInput(@"images\Irish.png"))
        {
            // Perform OCR to read the Irish text from the image
            var Result = Ocr.Read(Input);

            // Get the recognized text as a string from the OCR result
            var AllText = Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
' Install the IronOCR Irish language package via NuGet:
' PM> Install-Package IronOCR.Languages.Irish

Imports IronOcr

Friend Class IrishOcrExample
	Shared Sub Main()
		' Create a new instance of the IronTesseract OCR engine
		Dim Ocr = New IronTesseract()

		' Set the language to Irish for OCR processing
		Ocr.Language = OcrLanguage.Irish

		' Using the OCR input, specify the path to the image containing Irish text
		Using Input = New OcrInput("images\Irish.png")
			' Perform OCR to read the Irish text from the image
			Dim Result = Ocr.Read(Input)

			' Get the recognized text as a string from the OCR result
			Dim AllText = Result.Text

			' Output the recognized text
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel

En este ejemplo, utilizamos la clase IronTesseract de la biblioteca IronOCR para realizar OCR en una imagen que contiene texto escrito en el idioma irlandés. El objeto OcrInput se utiliza para cargar la imagen, y el método Ocr.Read procesa la imagen para extraer el texto. El texto resultante se almacena luego en la variable AllText y se imprime en la consola.