Greek Alphabet 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, y compris l'alphabet grec.
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.Greek
Ce package contient 102 langues OCR for .NET :
- Grec
- GreekBest
- GreekFast
- Alphabet grec
- Meilleur alphabet grec
- Alphabet grec rapide
Télécharger
Pack de langue de l'alphabet grec [\u03b5\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac]
Installation
La première étape consiste à installer le package OCR de l'alphabet grec dans votre projet .NET.
Install-Package IronOcr.Languages.Greek
Exemple de code
Cet exemple de code C# lit le texte de l'alphabet grec à partir d'une image ou d'un document PDF.
// Import the IronOcr namespace
using IronOcr;
class GreekOcrExample
{
static void Main()
{
// Initialize the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Greek
Ocr.Language = OcrLanguage.Greek;
// Load the image or PDF containing Greek text
using (var Input = new OcrInput(@"images\Greek.png"))
{
// Perform OCR and get the result
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Output the recognized text
System.Console.WriteLine(AllText);
}
}
}
// Import the IronOcr namespace
using IronOcr;
class GreekOcrExample
{
static void Main()
{
// Initialize the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Greek
Ocr.Language = OcrLanguage.Greek;
// Load the image or PDF containing Greek text
using (var Input = new OcrInput(@"images\Greek.png"))
{
// Perform OCR and get the result
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Output the recognized text
System.Console.WriteLine(AllText);
}
}
}
' Import the IronOcr namespace
Imports IronOcr
Friend Class GreekOcrExample
Shared Sub Main()
' Initialize the IronTesseract OCR engine
Dim Ocr = New IronTesseract()
' Set the OCR language to Greek
Ocr.Language = OcrLanguage.Greek
' Load the image or PDF containing Greek text
Using Input = New OcrInput("images\Greek.png")
' Perform OCR and get the result
Dim Result = Ocr.Read(Input)
' Extract all recognized text
Dim AllText = Result.Text
' Output the recognized text
System.Console.WriteLine(AllText)
End Using
End Sub
End Class
- IronTesseract : Cette classe est responsable de l'exécution de l'opération OCR.
- OcrInput : Cette classe est utilisée pour charger les images ou les fichiers PDF pour le traitement OCR.
- Ocr.Read() : Méthode permettant d'effectuer la reconnaissance optique de caractères (OCR) sur les données d'entrée et de fournir le texte reconnu.
Avant d'exécuter ce code, assurez-vous que la bibliothèque IronOcr et le pack de langue grecque sont correctement installés dans votre projet .NET. Ce code affichera le texte extrait de l'image située à images/Greek.png.

