Malayalam OCR in C# and .NET

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

Mais 126 idiomas

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

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

  • Malaiala
  • MalaialaBest
  • MalaialaFast
  • MalaialaAlphabet
  • MalaialaAlphabetBest
  • MalaialaAlphabetFast

Baixar

Pacote de Idioma Malaiala [മലയാളം]

Instalação

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

Install-Package IronOcr.Languages.Malayalam

Exemplo de código

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

// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Create a new instance of IronTesseract
        var Ocr = new IronTesseract();

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

        // Process the image to extract text using OCR
        using (var Input = new OcrInput(@"images\Malayalam.png"))
        {
            // Read the text from the input object
            var Result = Ocr.Read(Input);

            // Extract and store the recognized text
            var AllText = Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Create a new instance of IronTesseract
        var Ocr = new IronTesseract();

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

        // Process the image to extract text using OCR
        using (var Input = new OcrInput(@"images\Malayalam.png"))
        {
            // Read the text from the input object
            var Result = Ocr.Read(Input);

            // Extract and store the recognized text
            var AllText = Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
$vbLabelText   $csharpLabel
  • O código demonstra a configuração do IronOCR para realizar OCR em uma imagem especificada com o idioma malaiala.
  • O objeto OcrInput é usado para inserir o arquivo de imagem.
  • A função Ocr.Read processa a imagem e extrai o texto.
  • O texto extraído é armazenado em AllText e impresso no console.