Sundanese OCR in C# and .NET
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 sundanê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.Línguas.Sundanês
Este pacote contém 52 linguagens de OCR for .NET:
- Sundanês
- SundaneseBest
- Jejum sundanês
Baixar
Pacote de idioma sudanês [Basa Sunda]
Instalação
A primeira coisa que precisamos fazer é instalar nosso pacote de OCR para sundanês em seu projeto .NET.
Install-Package IronOcr.Languages.Sundanese
Exemplo de código
Este exemplo de código C# lê texto em sundanês de uma imagem ou documento PDF.
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Specify the language the OCR engine should use
Ocr.Language = OcrLanguage.Sundanese;
// Initialize the OCR input with an image file containing Sundanese text
using (var Input = new OcrInput(@"images\Sundanese.png"))
{
// Process the input and get the result
var Result = Ocr.Read(Input);
// Extract all recognized text from the result
var AllText = Result.Text;
// Output the recognized text
System.Console.WriteLine(AllText);
}
}
}
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Specify the language the OCR engine should use
Ocr.Language = OcrLanguage.Sundanese;
// Initialize the OCR input with an image file containing Sundanese text
using (var Input = new OcrInput(@"images\Sundanese.png"))
{
// Process the input and get the result
var Result = Ocr.Read(Input);
// Extract all recognized text from the result
var AllText = Result.Text;
// Output the recognized text
System.Console.WriteLine(AllText);
}
}
}
' Import the IronOcr namespace
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create a new instance of the IronTesseract class
Dim Ocr = New IronTesseract()
' Specify the language the OCR engine should use
Ocr.Language = OcrLanguage.Sundanese
' Initialize the OCR input with an image file containing Sundanese text
Using Input = New OcrInput("images\Sundanese.png")
' Process the input and get the result
Dim Result = Ocr.Read(Input)
' Extract all recognized text from the result
Dim AllText = Result.Text
' Output the recognized text
System.Console.WriteLine(AllText)
End Using
End Sub
End Class
Explicação
- Primeiro, importamos o namespace
IronOcrpara usar sua funcionalidade de OCR. - Uma instância de
IronTesseracté criada, que atua como nosso principal mecanismo de OCR. - Definimos a propriedade
LanguageparaOcrLanguage.Sundanesepara especificar que o mecanismo deve esperar ler texto em Sundanês. - Criamos um objeto
OcrInputpara especificar a fonte do arquivo de imagem para nosso mecanismo de OCR. - O método
Readprocessa a entrada e tenta reconhecer o texto. - O texto reconhecido é armazenado na variável
AllTexte subsequentemente impresso no console.
Essa configuração permite o reconhecimento robusto de texto em língua sundanesa a partir de imagens, utilizando a biblioteca IronOCR em um ambiente .NET.

