OCR bulgare en C# et .NET

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

IronOCR est un composant logiciel C# permettant aux développeurs .NET de lire du texte à partir d'images et de documents PDF dans 126 langues, dont le bulgare.

Il s'agit d'une version avancée de Tesseract, conçue exclusivement pour les développeurs .NET et qui surpasse régulièrement les autres moteurs Tesseract en termes de vitesse et de précision.

Contenu de IronOcr.Langues.Bulgare

Ce package contient 52 langues OCR pour .NET :

  • Bulgare
  • BulgarianBest
  • BulgarianFast

Télécharger

Pack de langue bulgare [langue bulgare]

  • Télécharger au format ZIP
  • Installer avec NuGet

Installation

La première chose à faire est d'installer notre package OCR bulgare sur votre projet .NET.

Install-Package IronOCR.Languages.Bulgarian

Exemple de code

Cet exemple de code C# lit du texte bulgare à partir d'une image ou d'un document 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

Dans cet exemple :

  • Nous créons un objet IronTesseract pour effectuer les opérations OCR.
  • Nous avons défini la langue de l'OCR sur le bulgare en utilisant OcrLanguage.Bulgarian .
  • Nous chargeons un fichier image Bulgarian.png dans un objet OcrInput .
  • Nous utilisons Ocr.Read(Input) pour extraire le texte de l'image.
  • Enfin, le texte extrait est accessible via Result.Text .