Bulgarian OCR in C# and .NET
Outras versões deste documento:
O IronOCR é um componente de software em C# que permite aos programadores .NET ler texto de imagens e documentos PDF em 126 idiomas, incluindo o búlgaro.
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.Idiomas.Búlgaro
Este pacote contém 52 linguagens de OCR for .NET:
- Búlgaro
- Melhor búlgaro
- BulgarianFast
Baixar
Pacote de idioma búlgaro [български език]
Instalação
A primeira coisa que precisamos fazer é instalar nosso pacote de OCR para búlgaro em seu projeto .NET .
Install-Package IronOcr.Languages.Bulgarian
Exemplo de código
Este exemplo de código C# lê texto búlgaro de uma imagem ou documento PDF.
// Ensure you have installed the IronOCR language package for Bulgarian
// PM> Install-Package IronOcr.Languages.Bulgarian
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to Bulgarian
Ocr.Language = OcrLanguage.Bulgarian;
// Load the image or PDF document containing Bulgarian text
using (var Input = new OcrInput(@"images\Bulgarian.png"))
{
// Perform OCR and obtain the result
var Result = Ocr.Read(Input);
// Extract all the text from the OCR result
var AllText = Result.Text;
// Optionally, print or use the extracted text as needed
Console.WriteLine(AllText);
}
// Ensure you have installed the IronOCR language package for Bulgarian
// PM> Install-Package IronOcr.Languages.Bulgarian
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to Bulgarian
Ocr.Language = OcrLanguage.Bulgarian;
// Load the image or PDF document containing Bulgarian text
using (var Input = new OcrInput(@"images\Bulgarian.png"))
{
// Perform OCR and obtain the result
var Result = Ocr.Read(Input);
// Extract all the text from the OCR result
var AllText = Result.Text;
// Optionally, print or use the extracted text as needed
Console.WriteLine(AllText);
}
' Ensure you have installed the IronOCR language package for Bulgarian
' PM> Install-Package IronOcr.Languages.Bulgarian
Imports IronOcr
Private Ocr = New IronTesseract()
' Set the OCR language to Bulgarian
Ocr.Language = OcrLanguage.Bulgarian
' Load the image or PDF document containing Bulgarian text
Using Input = New OcrInput("images\Bulgarian.png")
' Perform OCR and obtain the result
Dim Result = Ocr.Read(Input)
' Extract all the text from the OCR result
Dim AllText = Result.Text
' Optionally, print or use the extracted text as needed
Console.WriteLine(AllText)
End Using
Neste exemplo:
- Criamos um objeto
IronTesseractpara realizar as operações de OCR. - Definimos o idioma para OCR como Búlgaro usando
OcrLanguage.Bulgarian. - Carregamos um arquivo de imagem
Bulgarian.pngem um objetoOcrInput. - Usamos
Ocr.Read(Input)para extrair texto da imagem. - Finalmente, o texto extraído é acessado usando
Result.Text.

