C# と .NET での Marathi OCR

This article was translated from English: Does it need improvement?
Translated
View the article in English
Other versions of this document:

*マラーティー語中級

IronOCR は、.NET コーダーがマラーティー語を含む 126 の言語で画像や PDF ドキュメントからテキストを読み取ることを可能にする C# ソフトウェア コンポーネントです。

これは Tesseract の高度なフォークであり、.NET 開発者専用に構築されており、速度と精度の両方で他の Tesseract エンジンを常に上回っています。

IronOcr.Languages.Marathi の内容

このパッケージには、.NET 用の 46 の OCR 言語が含まれています。

  • マラーティー語
  • マラーティー語ベスト
  • マラーティーファスト

ダウンロード

マラーティー語言語パック[マラーティー語]

  • Zip形式でダウンロード
  • NuGetでインストール

インストール

最初に、 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);
        }
    }
}
$vbLabelText   $csharpLabel

説明:

  • このコードは、 IronOCRライブラリのIronTesseractクラスを使用して OCR を実行します。
  • Ocr.Languageプロパティは、マラーティー語言語パックを使用するように設定されています。
  • マラーティー語のテキストを含む画像または PDF へのパスを使用して、 OcrInputが作成されます。
  • Ocr.Read()メソッドは入力を処理し、テキストを抽出します。
  • 認識されたテキストはAllText変数に保存され、コンソールに出力されます。