C# と .NET でのシンド語 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.Sindhi の内容

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

  • シンディー語
  • シンディーベスト
  • シンディファスト

ダウンロード

シンド語言語パック[सिनधी]

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

インストール

最初に、.NET プロジェクトにSindhi OCR パッケージをインストールします。

Install-Package IronOCR.Languages.Sindhi

Code Example

この C# コード例は、画像または PDF ドキュメントからシンド語のテキストを読み取ります。

// Ensure the IronOCR package and Sindhi language pack are installed
using IronOcr;

var Ocr = new IronTesseract
{
    Language = OcrLanguage.Sindhi  // Set the OCR language to Sindhi
};

// Open an image or PDF document for OCR processing
using (var Input = new OcrInput(@"images\Sindhi.png"))
{
    // Perform OCR and get the results
    var Result = Ocr.Read(Input);

    // Extract the recognized text
    var AllText = Result.Text;

    // Optionally, you can do something with the extracted text,
    // such as displaying or saving it to a file.
}
// Ensure the IronOCR package and Sindhi language pack are installed
using IronOcr;

var Ocr = new IronTesseract
{
    Language = OcrLanguage.Sindhi  // Set the OCR language to Sindhi
};

// Open an image or PDF document for OCR processing
using (var Input = new OcrInput(@"images\Sindhi.png"))
{
    // Perform OCR and get the results
    var Result = Ocr.Read(Input);

    // Extract the recognized text
    var AllText = Result.Text;

    // Optionally, you can do something with the extracted text,
    // such as displaying or saving it to a file.
}
' Ensure the IronOCR package and Sindhi language pack are installed
Imports IronOcr

Private Ocr = New IronTesseract With {.Language = OcrLanguage.Sindhi}

' Open an image or PDF document for OCR processing
Using Input = New OcrInput("images\Sindhi.png")
	' Perform OCR and get the results
	Dim Result = Ocr.Read(Input)

	' Extract the recognized text
	Dim AllText = Result.Text

	' Optionally, you can do something with the extracted text,
	' such as displaying or saving it to a file.
End Using
$vbLabelText   $csharpLabel

このコードサンプルでは次のようになります。

  • IronTesseractのインスタンスをセットアップします。
  • OCR 言語をシンド語に設定します。
  • シンド語のテキストを含む画像ファイルを開きます。
  • 画像に対して OCR を実行し、 Readメソッドを使用してテキストを抽出します。
  • 抽出されたテキストは、後で使用するためにAllText変数に保存されます。