Myanmar OCR in C# and .NET
IronOCR ist eine C#-Softwarekomponente, die es .NET-Entwicklern ermöglicht, Text aus Bildern und PDF-Dokumenten in 126 Sprachen, einschließlich Myanmar, zu lesen. Es ist ein fortgeschrittener Fork von Tesseract, der ausschließlich for .NET-Entwickler entwickelt wurde und in Bezug auf Geschwindigkeit und Genauigkeit regelmäßig andere Tesseract-Engines übertrifft.
Inhalt von IronOcr.Languages.Myanmar
Dieses Paket enthält OCR-Unterstützung für 114 Sprachen, die spezifisch für Myanmar sind:
- Myanmar
- MyanmarBest
- MyanmarFast
- MyanmarAlphabet
- MyanmarAlphabetBest
- MyanmarAlphabetFast
Download
Myanmar Sprachpaket [Burmese]
Installation
Zuerst installieren Sie das Myanmar OCR-Paket in Ihr .NET-Projekt über NuGet:
Install-Package IronOcr.Languages.Myanmar
Beispielcode
Dieses C#-Codebeispiel liest Myanmar-Text aus einem Bild oder PDF-Dokument.
// 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
Erklärung
- IronTesseract: Dies ist die Hauptklasse, die von der IronOCR-Bibliothek bereitgestellt wird und OCR-Aufgaben verwaltet.
- Ocr.Language: Legt die Sprache für OCR fest; Dieses Beispiel ist auf
OcrLanguage.Myanmareingestellt. - OcrInput: Wird verwendet, um die Eingabequelle anzugeben, die ein Bild oder eine PDF-Datei sein könnte.
- Ocr.Read : Führt den OCR-Prozess durch und gibt ein
OcrResult-Objekt zurück. - Result.Text: Enthält den extrahierten Text aus dem Bild oder PDF-Dokument.

