Kyrgyz 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 Kirguiz.

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

Este pacote contém 43 linguagens OCR for .NET:

  • Kyrgyz
  • KyrgyzBest
  • KyrgyzFast

Baixar

Pacote de Idioma Kirguiz [Кыргызча]

Instalação

A primeira coisa que temos que fazer é instalar nosso pacote OCR de Kirguiz no seu projeto .NET.

Install-Package IronOcr.Languages.Kyrgyz

Exemplo de código

Este exemplo de código C# lê texto Kirguiz de uma imagem ou documento PDF.

// Import the IronOcr namespace
using IronOcr;

public class KyrgyzOcrExample
{
    public void PerformOcr()
    {
        // Initialize IronTesseract for OCR operations
        var Ocr = new IronTesseract();

        // Set the OCR language to Kyrgyz
        Ocr.Language = OcrLanguage.Kyrgyz;

        // Define the input using an image file path
        using (var Input = new OcrInput(@"images\Kyrgyz.png"))
        {
            // Perform OCR and get the result
            var Result = Ocr.Read(Input);

            // Extracted text from the image
            string AllText = Result.Text;

            // Output the extracted text (or use it in your application as needed)
            Console.WriteLine(AllText);
        }
    }
}
// Import the IronOcr namespace
using IronOcr;

public class KyrgyzOcrExample
{
    public void PerformOcr()
    {
        // Initialize IronTesseract for OCR operations
        var Ocr = new IronTesseract();

        // Set the OCR language to Kyrgyz
        Ocr.Language = OcrLanguage.Kyrgyz;

        // Define the input using an image file path
        using (var Input = new OcrInput(@"images\Kyrgyz.png"))
        {
            // Perform OCR and get the result
            var Result = Ocr.Read(Input);

            // Extracted text from the image
            string AllText = Result.Text;

            // Output the extracted text (or use it in your application as needed)
            Console.WriteLine(AllText);
        }
    }
}
$vbLabelText   $csharpLabel
  • Este bloco de código inicializa um objeto IronTesseract para realizar OCR.
  • Define o idioma para quirguiz usando o enum OcrLanguage.Kyrgyz.
  • A classe OcrInput é usada para especificar o caminho do arquivo da imagem da qual o texto será extraído.
  • Ocr.Read(Input) realiza o processo de OCR e fornece um resultado contendo o texto extraído acessível via Result.Text.
  • Finalmente, Console.WriteLine(AllText) exibe o texto extraído no console.