Irish 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 C# permitindo que programadores .NET leiam texto de imagens e documentos PDF em 126 idiomas, incluindo o Irlandês.

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údo do IronOcr.Languages.Irish

Este pacote contém 40 idiomas de OCR for .NET:

  • Irlandês
  • IrishBest
  • IrishFast

Baixar

Pacote de Idioma Irlandês [Gaeilge]

Instalação

A primeira coisa que precisamos fazer é instalar nosso pacote OCR Irlandês em seu projeto .NET.

Install-Package IronOcr.Languages.Irish

Exemplo de código

Este exemplo de código C# lê texto em irlandês de uma imagem ou 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);
        }
    }
}
$vbLabelText   $csharpLabel

Neste exemplo, utilizamos a classe IronTesseract da biblioteca IronOCR para realizar OCR em uma imagem contendo texto escrito no idioma irlandês. O objeto OcrInput é usado para carregar a imagem, e o método Ocr.Read processa a imagem para extrair texto. O texto resultante é então armazenado na variável AllText e impresso no console.