Breton OCR in C# and .NET
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 breton. 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.Breton
Ce package contient 43 langues OCR for .NET :
- Breton
- BretonBest
- BretonFast
Télécharger
Pack de langues bretonnes [brezhoneg]
Installation
La première chose à faire est d'installer notre package OCR Breton sur votre projet .NET.
Install-Package IronOcr.Languages.Breton
Exemple de code
Cet exemple de code C# lit du texte breton à partir d'une image ou d'un document PDF.
// Import the IronOCR namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Breton
Ocr.Language = OcrLanguage.Breton;
// Read text from a Breton image or PDF document
using (var Input = new OcrInput(@"images\Breton.png"))
{
// Perform OCR on the input
var Result = Ocr.Read(Input);
// Extract text from the OCR result
var AllText = Result.Text;
// Output the extracted text
Console.WriteLine(AllText);
}
}
}
// Import the IronOCR namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Breton
Ocr.Language = OcrLanguage.Breton;
// Read text from a Breton image or PDF document
using (var Input = new OcrInput(@"images\Breton.png"))
{
// Perform OCR on the input
var Result = Ocr.Read(Input);
// Extract text from the OCR result
var AllText = Result.Text;
// Output the extracted text
Console.WriteLine(AllText);
}
}
}
' Import the IronOCR namespace
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Initialize the IronTesseract OCR engine
Dim Ocr = New IronTesseract()
' Set the OCR language to Breton
Ocr.Language = OcrLanguage.Breton
' Read text from a Breton image or PDF document
Using Input = New OcrInput("images\Breton.png")
' Perform OCR on the input
Dim Result = Ocr.Read(Input)
' Extract text from the OCR result
Dim AllText = Result.Text
' Output the extracted text
Console.WriteLine(AllText)
End Using
End Sub
End Class
- Cet exemple montre comment utiliser la bibliothèque IronOCR pour effectuer une reconnaissance optique de caractères (OCR) sur une image de texte breton.
IronTesseractfournit la fonctionnalité OCR de base.- Le
OcrInputest créé avec le chemin d'accès à l'image contenant le texte breton. - La méthode
Readtraite l'image d'entrée et extrait le texte, qui est ensuite affiché dans la console.

