C# と .NET でのミャンマー語 OCR
IronOCRは、.NET開発者がミャンマー語を含む126言語の画像やPDF文書からテキストを読み取ることを可能にするC#ソフトウェアコンポーネントです。Tesseractの高度なフォークであり、.NET開発者専用に開発されており、速度と精度の両方で他のTesseractエンジンを常に上回っています。
IronOcr.Languages.Myanmar の内容
このパッケージには、ミャンマー特有の 114 言語の OCR サポートが含まれています。
- ミャンマー
- ミャンマーベスト
- ミャンマーファースト
- ミャンマー語アルファベット
- ミャンマーアルファベットベスト
- ミャンマーアルファベットファースト
ダウンロード
ミャンマー語パック[ビルマ語]
インストール
まず、NuGet 経由でミャンマーOCR パッケージを .NET プロジェクトにインストールします。
Install-Package IronOCR.Languages.Myanmar
Code Example
この C# コード例は、画像または 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説明
- IronTesseract : これは、OCR タスクを処理する IronOCR ライブラリによって提供されるメイン クラスです。
- Ocr.Language : OCR の言語を設定します。 この例では、
OcrLanguage.Myanmarに設定されています。 - OcrInput : 入力ソース(画像または PDF ファイル)を指定するために使用されます。
- Ocr.Read : OCR プロセスを実行し、
OcrResultオブジェクトを返します。 - Result.Text : 画像または PDF ドキュメントから抽出されたテキストが含まれます。





