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.Hebrew の内容

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

  • ヘブライ語
  • ヘブライ語ベスト
  • ヘブライファスト
  • ヘブライ語アルファベット
  • ヘブライ語アルファベットベスト
  • ヘブライ語アルファベット高速

ダウンロード

ヘブライ語言語パック[ヘブライ語]

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

インストール

最初に、ヘブライ語OCR パッケージを .NET プロジェクトにインストールする必要があります。

Install-Package IronOCR.Languages.Hebrew

Code Example

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

// Include the IronOcr namespace to work with OCR features
using IronOcr;

// Create an OCR engine
var Ocr = new IronTesseract();

// Set the OCR engine language to Hebrew
Ocr.Language = OcrLanguage.Hebrew;

// Process the image and extract text using OCR
using (var Input = new OcrInput(@"images\Hebrew.png"))
{
    // Read the text from the input image
    var Result = Ocr.Read(Input);

    // Store the extracted text
    var AllText = Result.Text;

    // Output the extracted text to the console (optional)
    Console.WriteLine(AllText);
}
// Include the IronOcr namespace to work with OCR features
using IronOcr;

// Create an OCR engine
var Ocr = new IronTesseract();

// Set the OCR engine language to Hebrew
Ocr.Language = OcrLanguage.Hebrew;

// Process the image and extract text using OCR
using (var Input = new OcrInput(@"images\Hebrew.png"))
{
    // Read the text from the input image
    var Result = Ocr.Read(Input);

    // Store the extracted text
    var AllText = Result.Text;

    // Output the extracted text to the console (optional)
    Console.WriteLine(AllText);
}
' Include the IronOcr namespace to work with OCR features
Imports IronOcr

' Create an OCR engine
Private Ocr = New IronTesseract()

' Set the OCR engine language to Hebrew
Ocr.Language = OcrLanguage.Hebrew

' Process the image and extract text using OCR
Using Input = New OcrInput("images\Hebrew.png")
	' Read the text from the input image
	Dim Result = Ocr.Read(Input)

	' Store the extracted text
	Dim AllText = Result.Text

	' Output the extracted text to the console (optional)
	Console.WriteLine(AllText)
End Using
$vbLabelText   $csharpLabel
  • IronTesseract : このクラスは、OCR エンジンを初期化するために使用されます。
  • OcrInput : これは、OCR エンジンが読み取る入力画像またはドキュメントを表します。
  • Ocr.Read : このメソッドは入力を処理し、抽出されたテキストを含む結果を返します。
  • Result.Text: 抽出されたテキストを保存し、さらなる処理に使用できます。