Marathi OCR in C# and .NET
このドキュメントの他のバージョン:
IronOCR は、.NET コーダーがマラーティー語を含む 126 の言語で画像や PDF ドキュメントからテキストを読み取ることを可能にする C# ソフトウェア コンポーネントです。
これは Tesseract の高度なフォークであり、.NET 開発者専用に構築されており、速度と精度の両方で他の Tesseract エンジンを常に上回っています。
IronOcr.Languages.Marathi の内容
このパッケージには、.NET 用の 46 の OCR 言語が含まれています。
- マラーティー語
- マラーティー語Best
- マラーティーファスト
ダウンロード
マラーティー語言語パック[マラーティー語]
インストール
最初に、 Marathi OCR パッケージを .NET プロジェクトにインストールする必要があります。
Install-Package IronOcr.Languages.Marathi
Code Example
この C# コード例は、画像または PDF ドキュメントからマラーティー語のテキストを読み取ります。
// Include the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the OCR engine
var Ocr = new IronTesseract();
// Specify the language as Marathi
Ocr.Language = OcrLanguage.Marathi;
// Load the image or PDF document to be processed
using (var Input = new OcrInput(@"images\Marathi.png"))
{
// Perform OCR on the input document
var Result = Ocr.Read(Input);
// Get the recognized text
var AllText = Result.Text;
// Output the recognized text to console
Console.WriteLine(AllText);
}
}
}
// Include the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the OCR engine
var Ocr = new IronTesseract();
// Specify the language as Marathi
Ocr.Language = OcrLanguage.Marathi;
// Load the image or PDF document to be processed
using (var Input = new OcrInput(@"images\Marathi.png"))
{
// Perform OCR on the input document
var Result = Ocr.Read(Input);
// Get the recognized text
var AllText = Result.Text;
// Output the recognized text to console
Console.WriteLine(AllText);
}
}
}
' Include the IronOcr namespace
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Initialize the OCR engine
Dim Ocr = New IronTesseract()
' Specify the language as Marathi
Ocr.Language = OcrLanguage.Marathi
' Load the image or PDF document to be processed
Using Input = New OcrInput("images\Marathi.png")
' Perform OCR on the input document
Dim Result = Ocr.Read(Input)
' Get the recognized text
Dim AllText = Result.Text
' Output the recognized text to console
Console.WriteLine(AllText)
End Using
End Sub
End Class
説明:
- このコードは、
IronOCRクラスを使用してOCRを実行しています。 Ocr.Languageプロパティは、マラーティー語の言語パックを使用するように設定されています。OcrInputは、マラーティー語のテキストを含む画像またはPDFへのパスを使用して作成されます。Ocr.Read()メソッドは、入力を処理してテキストを抽出します。- 認識されたテキストは
AllText変数に格納され、コンソールにPRINTされます。

