C# と .NET でのポーランド語 OCR
Other versions of this document:
IronOCR は、.NET 開発者がポーランド語を含む 126 の言語で画像や PDF ドキュメントからテキストを読み取ることができる C# ソフトウェア コンポーネントです。 これは、.NET 開発者専用に構築された Tesseract の高度なフォークであり、速度と精度の両方において他の Tesseract エンジンを常に上回っています。
IronOcr.Languages.Polish の内容
このパッケージには、.NET 用の 43 の OCR 言語が含まれています。
- ポーランド語
- ポーランドベスト
- ポーランドファースト
ダウンロード
ポーランド語言語パック:
インストール
最初に、ポーランド語OCR パッケージを .NET プロジェクトにインストールします。
NuGet パッケージ マネージャーを使用してインストールするには、次のコマンドを実行します。
Install-Package IronOCR.Languages.Polish
Code Example
この C# コード例は、IronOCR を使用して画像または PDF ドキュメントからポーランド語のテキストを読み取る方法を示しています。
// Install the IronOcr.Languages.Polish package via NuGet before using this code.
using IronOcr;
public class PolishOcrExample
{
public void ReadPolishTextFromImage()
{
// Initialize the IronTesseract object
var Ocr = new IronTesseract();
// Set the language to Polish
Ocr.Language = OcrLanguage.Polish;
// Provide the path to the image or PDF file containing Polish text
using (var Input = new OcrInput(@"images\Polish.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Display or process the recognized text
Console.WriteLine(AllText);
}
}
}// Install the IronOcr.Languages.Polish package via NuGet before using this code.
using IronOcr;
public class PolishOcrExample
{
public void ReadPolishTextFromImage()
{
// Initialize the IronTesseract object
var Ocr = new IronTesseract();
// Set the language to Polish
Ocr.Language = OcrLanguage.Polish;
// Provide the path to the image or PDF file containing Polish text
using (var Input = new OcrInput(@"images\Polish.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Display or process the recognized text
Console.WriteLine(AllText);
}
}
}このスクリプトは、OCR エンジンを初期化し、言語 (ポーランド語) を指定し、"images\Polish.png"にある画像を処理してテキストを抽出し、表示します。 コードを実行する前に、ファイル パスが正しいことと、OCR パッケージがインストールされていることを確認してください。





