OCR búlgaro en C# y .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Other versions of this document:

IronOCR es un componente de software C# que permite a los programadores de .NET leer texto de imágenes y documentos PDF en 126 idiomas, incluyendo búlgaro.

Es una bifurcación avanzada de Tesseract, creada exclusivamente para desarrolladores de .NET y supera regularmente a otros motores de Tesseract tanto en velocidad como en precisión.

Contenido de IronOcr.Languages.Bulgarian

Este paquete contiene 52 idiomas de OCR para .NET:

  • Búlgaro
  • BulgarianBest
  • BulgarianFast

Descargar

Paquete de idioma búlgaro [български език]

Instalación

Lo primero que tenemos que hacer es instalar nuestro paquete OCR Búlgaro en tu proyecto .NET.

Install-Package IronOCR.Languages.Bulgarian

Ejemplo de código

Este ejemplo de código C# lee texto búlgaro de una imagen o 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
$vbLabelText   $csharpLabel

En este ejemplo:

  • Creamos un objeto IronTesseract para realizar las operaciones OCR.
  • Configuramos el idioma para OCR a búlgaro usando OcrLanguage.Bulgarian.
  • Cargamos un archivo de imagen Bulgarian.png en un objeto OcrInput.
  • Usamos Ocr.Read(Input) para extraer texto de la imagen.
  • Finalmente, el texto extraído se accede usando Result.Text.