Irish OCR in C# and .NET
Autres versions de ce 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 l'irlandais.
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 d'IronOcr.Langues.Irlandais
Ce package contient 40 langues OCR for .NET :
- Irlandais
- IrishBest
- IrishFast
Télécharger
Pack de langue irlandaise [irlandais]
Installation
La première chose à faire est d'installer notre package OCR irlandais sur votre projet .NET.
Install-Package IronOcr.Languages.Irish
Exemple de code
Cet exemple de code C# lit du texte irlandais à partir d'une image ou d'un document PDF.
// Install the IronOCR Irish language package via NuGet:
// PM> Install-Package IronOcr.Languages.Irish
using IronOcr;
class IrishOcrExample
{
static void Main()
{
// Create a new instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Irish for OCR processing
Ocr.Language = OcrLanguage.Irish;
// Using the OCR input, specify the path to the image containing Irish text
using (var Input = new OcrInput(@"images\Irish.png"))
{
// Perform OCR to read the Irish text from the image
var Result = Ocr.Read(Input);
// Get the recognized text as a string from the OCR result
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
// Install the IronOCR Irish language package via NuGet:
// PM> Install-Package IronOcr.Languages.Irish
using IronOcr;
class IrishOcrExample
{
static void Main()
{
// Create a new instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Irish for OCR processing
Ocr.Language = OcrLanguage.Irish;
// Using the OCR input, specify the path to the image containing Irish text
using (var Input = new OcrInput(@"images\Irish.png"))
{
// Perform OCR to read the Irish text from the image
var Result = Ocr.Read(Input);
// Get the recognized text as a string from the OCR result
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
Imports IronOcr
Module IrishOcrExample
Sub Main()
' Create a new instance of the IronTesseract OCR engine
Dim Ocr As New IronTesseract()
' Set the language to Irish for OCR processing
Ocr.Language = OcrLanguage.Irish
' Using the OCR input, specify the path to the image containing Irish text
Using Input As New OcrInput("images\Irish.png")
' Perform OCR to read the Irish text from the image
Dim Result = Ocr.Read(Input)
' Get the recognized text as a string from the OCR result
Dim AllText As String = Result.Text
' Output the recognized text
Console.WriteLine(AllText)
End Using
End Sub
End Module
Dans cet exemple, nous utilisons la classe IronTesseract de la bibliothèque IronOCR pour effectuer une reconnaissance optique de caractères (OCR) sur une image contenant du texte écrit en irlandais. L'objet OcrInput est utilisé pour charger l'image, et la méthode Ocr.Read traite l'image pour en extraire le texte. Le texte résultant est ensuite stocké dans la variable AllText et imprimé sur la console.

