Macedonian OCR in C# and .NET
Autres versions de ce document :
- En langue macédonienne
- 125 langues supplémentaires pour la reconnaissance optique de caractères (OCR)
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 macédonien. 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.Macédonien
Ce package contient 55 langues OCR for .NET :
- Macédonien
- MacédonienBest
- MacédonienFast
Télécharger
Pack de langue macédonienne [langue macédonienne]
Installation
La première chose à faire est d'installer notre package OCR macédonien sur votre projet .NET.
Install-Package IronOcr.Languages.Macedonian
Exemple de code
Cet exemple de code C# lit du texte macédonien à partir d'une image ou d'un document PDF.
// Using IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Create an instance of IronTesseract
var Ocr = new IronTesseract();
// Set the language for OCR to Macedonian
Ocr.Language = OcrLanguage.Macedonian;
// Using OcrInput to load an image
using (var Input = new OcrInput(@"images\Macedonian.png"))
{
// Perform OCR on the input
var Result = Ocr.Read(Input);
// Get the recognized text
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
// Using IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Create an instance of IronTesseract
var Ocr = new IronTesseract();
// Set the language for OCR to Macedonian
Ocr.Language = OcrLanguage.Macedonian;
// Using OcrInput to load an image
using (var Input = new OcrInput(@"images\Macedonian.png"))
{
// Perform OCR on the input
var Result = Ocr.Read(Input);
// Get the recognized text
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
' Using IronOcr namespace
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create an instance of IronTesseract
Dim Ocr = New IronTesseract()
' Set the language for OCR to Macedonian
Ocr.Language = OcrLanguage.Macedonian
' Using OcrInput to load an image
Using Input = New OcrInput("images\Macedonian.png")
' Perform OCR on the input
Dim Result = Ocr.Read(Input)
' Get the recognized text
Dim AllText = Result.Text
' Output the recognized text
Console.WriteLine(AllText)
End Using
End Sub
End Class
Explication :
- IronTesseract : Il s'agit d'une classe de la bibliothèque IronOCR qui fournit des fonctionnalités pour effectuer des opérations OCR.
- OcrInput : Cette classe est utilisée pour spécifier l'image ou le fichier PDF à partir duquel le texte doit être extrait.
- Ocr.Read() : Cette méthode effectue le processus OCR sur l'entrée donnée et renvoie le résultat qui inclut le texte reconnu.
Pour exécuter ce code, assurez-vous d'avoir installé la bibliothèque IronOCR et chargé le module de langue macédonienne dans votre projet.

