Myanmar OCR in C# and .NET
O IronOCR é um componente de software em C# que permite aos desenvolvedores .NET ler texto de imagens e documentos PDF em 126 idiomas, incluindo o birmanês. 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.Myanmar
Este pacote contém suporte OCR para 114 idiomas específicos de Myanmar:
- Mianmar
- MyanmarBest
- MyanmarFast
- Alfabeto de Mianmar
- MyanmarAlphabetBest
- Alfabeto de Mianmar Rápido
Baixar
Pacote de idiomas birmanês [birmanês]
Instalação
Primeiro, instale o pacote Myanmar OCR em seu projeto .NET via NuGet:
Install-Package IronOcr.Languages.Myanmar
Exemplo de código
Este exemplo de código C# lê texto em birmanês a partir de uma imagem ou documento PDF.
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Myanmar
Ocr.Language = OcrLanguage.Myanmar;
// Define input source - image or PDF containing Myanmar text
using (var Input = new OcrInput(@"images\Myanmar.png"))
{
// Perform OCR on the input and obtain the result
var Result = Ocr.Read(Input);
// Extract the recognized text from the OCR result
var AllText = Result.Text;
// Output the recognized Myanmar text
Console.WriteLine(AllText);
}
}
}
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Myanmar
Ocr.Language = OcrLanguage.Myanmar;
// Define input source - image or PDF containing Myanmar text
using (var Input = new OcrInput(@"images\Myanmar.png"))
{
// Perform OCR on the input and obtain the result
var Result = Ocr.Read(Input);
// Extract the recognized text from the OCR result
var AllText = Result.Text;
// Output the recognized Myanmar text
Console.WriteLine(AllText);
}
}
}
' Import the IronOcr namespace
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Initialize the IronTesseract OCR engine
Dim Ocr = New IronTesseract()
' Set the OCR language to Myanmar
Ocr.Language = OcrLanguage.Myanmar
' Define input source - image or PDF containing Myanmar text
Using Input = New OcrInput("images\Myanmar.png")
' Perform OCR on the input and obtain the result
Dim Result = Ocr.Read(Input)
' Extract the recognized text from the OCR result
Dim AllText = Result.Text
' Output the recognized Myanmar text
Console.WriteLine(AllText)
End Using
End Sub
End Class
Explicação
- IronTesseract : Esta é a classe principal fornecida pela biblioteca IronOCR que lida com tarefas de OCR.
- Ocr.Language : Define o idioma para OCR; este exemplo está configurado para
OcrLanguage.Myanmar. - OcrInput : Usado para especificar a fonte de entrada, que pode ser uma imagem ou um arquivo PDF.
- Ocr.Read: Executa o processo de OCR e retorna um objeto
OcrResult. - Result.Text : Contém o texto extraído da imagem ou do documento PDF.

