Myanmar OCR in C# and .NET
IronOCR to komponent oprogramowania w C#, pozwalający programistom .NET odczytywać tekst z obrazów i dokumentów PDF w 126 językach, w tym w Myanmar. Jest to zaawansowana wersja Tesseract, zbudowana wyłącznie dla programistów .NET i regularnie przewyższa inne silniki Tesseract zarówno pod względem szybkości, jak i dokładności.
Zawartość IronOcr.Languages.Myanmar
Pakiet ten zawiera wsparcie OCR dla 114 języków specyficznych dla Myanmar:
- Myanmar
- MyanmarBest
- MyanmarFast
- MyanmarAlphabet
- MyanmarAlphabetBest
- MyanmarAlphabetFast
Pobieranie
Myanmar Language Pack [Burmese]
Instalacja
Najpierw zainstaluj pakiet OCR Myanmar do swojego projektu .NET przez NuGet:
Install-Package IronOcr.Languages.Myanmar
Przyklad kodu
Ten przykład kodu C# odczytuje tekst w języku Myanmar z obrazu lub dokumentu 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
Wyjaśnienie
- IronTesseract: Główna klasa dostarczana przez biblioteka IronOCR, obsługująca zadania OCR.
- Ocr.Language: Ustawia język dla OCR; ten przykład jest ustawiony na
OcrLanguage.Myanmar. - OcrInput: Służy do określenia źródła wejściowego, które może być obrazem lub plikiem PDF.
- Ocr.Read: Wykonuje proces OCR i zwraca obiekt
OcrResult. - Result.Text: Zawiera wyodrębniony tekst z obrazu lub dokumentu PDF.

