Myanmar 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, y compris le birman. C'est un fork avancé de Tesseract, construit exclusivement pour les développeurs .NET et dépasse régulièrement d'autres moteurs Tesseract tant en vitesse qu'en précision.
Contenu de IronOcr.Languages.Myanmar
Ce package contient une prise en charge OCR pour 114 langues spécifiques au Myanmar :
- Myanmar
- MyanmarBest
- MyanmarFast
- Alphabet du Myanmar
- Meilleur alphabet du Myanmar
- MyanmarAlphabetFast
Télécharger
Pack de langue birmane [birman]
Installation
Commencez par installer le package OCR Myanmar dans votre projet .NET via NuGet :
Install-Package IronOcr.Languages.Myanmar
Exemple de code
Cet exemple de code C# lit du texte birman à 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 Myanmar
Ocr.Language = OcrLanguage.Myanmar;
// Define input source - image or PDF containing Myanmar text
using (var Input = new OcrInput(@"images\Myanmar.png"))
{
// Perform OCR on the input and obtain the result
var Result = Ocr.Read(Input);
// Extract the recognized text from the OCR result
var AllText = Result.Text;
// Output the recognized Myanmar 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 Myanmar
Ocr.Language = OcrLanguage.Myanmar;
// Define input source - image or PDF containing Myanmar text
using (var Input = new OcrInput(@"images\Myanmar.png"))
{
// Perform OCR on the input and obtain the result
var Result = Ocr.Read(Input);
// Extract the recognized text from the OCR result
var AllText = Result.Text;
// Output the recognized Myanmar 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 Myanmar
Ocr.Language = OcrLanguage.Myanmar
' Define input source - image or PDF containing Myanmar text
Using Input = New OcrInput("images\Myanmar.png")
' Perform OCR on the input and obtain the result
Dim Result = Ocr.Read(Input)
' Extract the recognized text from the OCR result
Dim AllText = Result.Text
' Output the recognized Myanmar text
Console.WriteLine(AllText)
End Using
End Sub
End Class
Explication
- IronTesseract : Il s'agit de la classe principale fournie par la bibliothèque IronOCR qui gère les tâches OCR.
- Ocr.Language : Définit la langue pour la reconnaissance optique de caractères (OCR) ; cet exemple est défini sur
OcrLanguage.Myanmar. - OcrInput : Utilisé pour spécifier la source d'entrée, qui peut être un fichier image ou PDF.
- Ocr.Read : Effectue le processus OCR et renvoie un objet
OcrResult. - Result.Text : Contient le texte extrait de l'image ou du document PDF.

