Bosnian OCR in C# and .NET
Autres versions de ce document :
IronOCR est un composant logiciel C# permettant aux d\u00e9veloppeurs .NET de lire du texte \u00e0 partir d'images et de documents PDF en 126 langues, y compris le bosniaque.
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.Languages.Bosnien
Ce package contient 46 langues OCR for .NET :
- Bosniaque
- BosnianBest
- BosnianFast
Télécharger
Pack de langue bosniaque [Langue bosniaque]
Installation
La première chose à faire est d'installer notre package OCR bosnien sur votre projet .NET.
Install-Package IronOcr.Languages.Bosnian
Exemple de code
Cet exemple de code C# lit du texte bosniaque \u00e0 partir d'une image ou d'un document PDF.
// Ensure the IronOCR library is included
using IronOcr;
class Program
{
static void Main()
{
// Initialize an instance of IronTesseract
var Ocr = new IronTesseract();
// Set the OCR language to Bosnian
Ocr.Language = OcrLanguage.Bosnian;
// Use OcrInput to specify the input file path for OCR
using (var Input = new OcrInput(@"images\Bosnian.png"))
{
// Perform OCR on the input image or PDF
var Result = Ocr.Read(Input);
// Extract the recognized text from the result
var AllText = Result.Text;
// Output the recognized text to the console
Console.WriteLine(AllText);
}
}
}
// Ensure the IronOCR library is included
using IronOcr;
class Program
{
static void Main()
{
// Initialize an instance of IronTesseract
var Ocr = new IronTesseract();
// Set the OCR language to Bosnian
Ocr.Language = OcrLanguage.Bosnian;
// Use OcrInput to specify the input file path for OCR
using (var Input = new OcrInput(@"images\Bosnian.png"))
{
// Perform OCR on the input image or PDF
var Result = Ocr.Read(Input);
// Extract the recognized text from the result
var AllText = Result.Text;
// Output the recognized text to the console
Console.WriteLine(AllText);
}
}
}
' Ensure the IronOCR library is included
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Initialize an instance of IronTesseract
Dim Ocr = New IronTesseract()
' Set the OCR language to Bosnian
Ocr.Language = OcrLanguage.Bosnian
' Use OcrInput to specify the input file path for OCR
Using Input = New OcrInput("images\Bosnian.png")
' Perform OCR on the input image or PDF
Dim Result = Ocr.Read(Input)
' Extract the recognized text from the result
Dim AllText = Result.Text
' Output the recognized text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class
- Le code ci-dessus montre comment effectuer une reconnaissance optique de caractères (OCR) sur une image de texte bosnien à l'aide d'IronOCR.
- La classe
IronTesseractest utilisée pour configurer et exécuter les tâches OCR. - La classe
OcrInputest utilisée pour spécifier le fichier image d'entrée à partir duquel le texte doit être extrait. Enfin, le texte reconnu est imprimé sur la console.

