Luxembourgish 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# que permite aos programadores .NET ler texto de imagens e documentos PDF em 126 idiomas, incluindo o luxemburguê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 de IronOcr.Languages.Luxembourgish

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

  • Luxemburguês
  • LuxembourgishBest
  • LuxembourgishFast

Baixar

Pacote de Idioma Luxemburguês [Lëtzebuergesch]

Instalação

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

Install-Package IronOcr.Languages.Luxembourgish

Exemplo de código

Este exemplo de código C# lê texto em luxemburguês a partir de uma imagem ou 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);
        }
    }
}
$vbLabelText   $csharpLabel
  • Este exemplo demonstra o uso do IronOCR para reconhecer texto em luxemburguês a partir de documentos locais.
  • O idioma é definido para luxemburguês para melhorar a precisão do reconhecimento de textos nesse idioma.
  • OcrInput() é usado para especificar a imagem de entrada ou arquivo PDF.
  • Ocr.Read() processa o documento, e o texto reconhecido é acessado via Result.Text.