Pashto 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:

O IronOCR é um componente de software C# que permite aos programadores .NET ler texto de imagens e documentos PDF em 126 idiomas, incluindo o pashto. 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.Pashto

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

  • Pashto
  • PashtoBest
  • PashtoFast

Baixar

Pacote de idioma pashto [پښتو]

Instalação

A primeira coisa que precisamos fazer é instalar nosso pacote OCR de pashto em seu projeto .NET.

Install-Package IronOcr.Languages.Pashto

Exemplo de código

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

// Import the IronOcr namespace
using IronOcr;

public class PashtoOcrExample
{
    public static void Main()
    {
        // Create an instance of the IronTesseract class
        var Ocr = new IronTesseract();

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

        // Specify the image file containing the Pashto text
        using (var Input = new OcrInput(@"images\Pashto.png"))
        {
            // Perform the OCR operation on the input image
            var Result = Ocr.Read(Input);

            // Store the extracted text from the image in a string variable
            var AllText = Result.Text;
        }
    }
}
// Import the IronOcr namespace
using IronOcr;

public class PashtoOcrExample
{
    public static void Main()
    {
        // Create an instance of the IronTesseract class
        var Ocr = new IronTesseract();

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

        // Specify the image file containing the Pashto text
        using (var Input = new OcrInput(@"images\Pashto.png"))
        {
            // Perform the OCR operation on the input image
            var Result = Ocr.Read(Input);

            // Store the extracted text from the image in a string variable
            var AllText = Result.Text;
        }
    }
}
$vbLabelText   $csharpLabel
  • Este trecho de código demonstra como utilizar a biblioteca IronOCR para reconhecer texto em pashto.
  • Configura a classe IronTesseract, seleciona Pashto como o idioma e processa um arquivo de imagem (Pashto.png) para extrair e exibir o texto.