Malayalam OCR in C# and .NET
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);
}
}
}
' Import the IronOcr namespace
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create a new instance of IronTesseract
Dim Ocr = New IronTesseract()
' Set the language to Malayalam
Ocr.Language = OcrLanguage.Malayalam
' Process the image to extract text using OCR
Using Input = New OcrInput("images\Malayalam.png")
' Read the text from the input object
Dim Result = Ocr.Read(Input)
' Extract and store the recognized text
Dim AllText = Result.Text
' Output the recognized text
Console.WriteLine(AllText)
End Using
End Sub
End Class
- 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.Readprocessa a imagem e extrai o texto. - O texto extraído é armazenado em
AllTexte impresso no console.

