Syriac OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English

Mais 126 idiomas

O IronOCR é um componente de software C# que permite aos programadores .NET ler texto de imagens e documentos PDF em 126 idiomas, incluindo o siríaco.

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

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

  • Siríaco
  • SiríacoMelhor
  • Siríaco Rápido
  • Alfabeto Siríaco
  • SiríacoAlphabetBest
  • Alfabeto Siríaco Rápido

Baixar

Pacote de idioma siríaco [Siríaco]

Instalação

O primeiro passo é instalar o pacote OCR siríaco em seu projeto .NET.

Install-Package IronOcr.Languages.Syriac

Exemplo de código

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

// Import the IronOcr library
using IronOcr;

class Program
{
    static void Main()
    {
        // Instantiate the IronTesseract object
        var Ocr = new IronTesseract();

        // Set the language to Syriac
        Ocr.Language = OcrLanguage.Syriac;

        // Create an OCR input from an image file
        using (var Input = new OcrInput(@"images\Syriac.png"))
        {
            // Read the image and extract the text
            var Result = Ocr.Read(Input);

            // Retrieve the full recognized text
            var AllText = Result.Text;

            // Output the text to the console
            Console.WriteLine(AllText);
        }
    }
}
// Import the IronOcr library
using IronOcr;

class Program
{
    static void Main()
    {
        // Instantiate the IronTesseract object
        var Ocr = new IronTesseract();

        // Set the language to Syriac
        Ocr.Language = OcrLanguage.Syriac;

        // Create an OCR input from an image file
        using (var Input = new OcrInput(@"images\Syriac.png"))
        {
            // Read the image and extract the text
            var Result = Ocr.Read(Input);

            // Retrieve the full recognized text
            var AllText = Result.Text;

            // Output the text to the console
            Console.WriteLine(AllText);
        }
    }
}
$vbLabelText   $csharpLabel

Neste exemplo:

  • Criamos uma instância de IronTesseract para processar OCR.
  • O Ocr.Language é configurado para Syriac para garantir reconhecimento preciso de texto para este idioma.
  • Carregamos uma imagem contendo texto em siríaco em OcrInput e a processamos usando Ocr.Read.
  • O texto reconhecido é então armazenado em Result.Text, que pode ser utilizado posteriormente em sua aplicação.