Ukrainian 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'ukrainien.
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.Ukrainien
Ce package contient 52 langues OCR for .NET :
- Ukrainien
- UkrainianBest
- UkrainianFast
Télécharger
Pack de langue ukrainienne [langue ukrainienne]
Installation
La première chose à faire est d'installer le package OCR ukrainien dans votre projet .NET.
Install-Package IronOcr.Languages.Ukrainian
Exemple de code
Cet exemple de code C# lit du texte ukrainien à partir d'une image ou d'un document PDF.
// Ensure you have the IronOcr.Languages.Ukrainian package installed.
// Using IronOcr namespace to access OCR functionalities.
using IronOcr;
// Initialize a new instance of IronTesseract
var Ocr = new IronTesseract();
// Set the OCR language to Ukrainian
Ocr.Language = OcrLanguage.Ukrainian;
// Use an OcrInput object for image input
using (var Input = new OcrInput(@"images\Ukrainian.png"))
{
// Perform OCR operation on the image
var Result = Ocr.Read(Input);
// Get the extracted text from the result
var AllText = Result.Text;
// Output or use the extracted text as needed
Console.WriteLine(AllText);
}
// Ensure you have the IronOcr.Languages.Ukrainian package installed.
// Using IronOcr namespace to access OCR functionalities.
using IronOcr;
// Initialize a new instance of IronTesseract
var Ocr = new IronTesseract();
// Set the OCR language to Ukrainian
Ocr.Language = OcrLanguage.Ukrainian;
// Use an OcrInput object for image input
using (var Input = new OcrInput(@"images\Ukrainian.png"))
{
// Perform OCR operation on the image
var Result = Ocr.Read(Input);
// Get the extracted text from the result
var AllText = Result.Text;
// Output or use the extracted text as needed
Console.WriteLine(AllText);
}
Imports IronOcr
' Initialize a new instance of IronTesseract
Dim Ocr As New IronTesseract()
' Set the OCR language to Ukrainian
Ocr.Language = OcrLanguage.Ukrainian
' Use an OcrInput object for image input
Using Input As New OcrInput("images\Ukrainian.png")
' Perform OCR operation on the image
Dim Result = Ocr.Read(Input)
' Get the extracted text from the result
Dim AllText = Result.Text
' Output or use the extracted text as needed
Console.WriteLine(AllText)
End Using
- Assurez-vous de remplacer le chemin
"images\Ukrainian.png"par le chemin d'accès à votre propre image ou document PDF. - Cet exemple montre comment configurer IronOCR pour reconnaître du texte ukrainien et afficher le texte extrait.

