Polish OCR in C# and .NET
このドキュメントの他のバージョン:
IronOCR は、.NET 開発者がポーランド語を含む 126 の言語で画像や PDF ドキュメントからテキストを読み取ることができる C# ソフトウェア コンポーネントです。 これは、.NET 開発者専用に構築された Tesseract の高度なフォークであり、速度と精度の両方において他の Tesseract エンジンを常に上回っています。
IronOcr.Languages.Polish の内容
このパッケージには、.NET 用の 43 の OCR 言語が含まれています。
- ポーランド語 *ポリッシュベスト
- ポーランドファースト
ダウンロード
ポーランド語言語パック:
インストール
最初に、ポーランド語OCR パッケージを .NET プロジェクトにインストールします。
NuGet パッケージ マネージャーを使用してインストールするには、次のコマンドを実行します。
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.
Imports IronOcr
Public Class PolishOcrExample
Public Sub ReadPolishTextFromImage()
' Initialize the IronTesseract object
Dim 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 Input = New OcrInput("images\Polish.png")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Extract all recognized text
Dim AllText = Result.Text
' Display or process the recognized text
Console.WriteLine(AllText)
End Using
End Sub
End Class' Install the IronOcr.Languages.Polish package via NuGet before using this code.
Imports IronOcr
Public Class PolishOcrExample
Public Sub ReadPolishTextFromImage()
' Initialize the IronTesseract object
Dim 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 Input = New OcrInput("images\Polish.png")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Extract all recognized text
Dim AllText = Result.Text
' Display or process the recognized text
Console.WriteLine(AllText)
End Using
End Sub
End Classこのスクリプトは、OCR エンジンを初期化し、言語 (ポーランド語) を指定し、"images\Polish.png"にある画像を処理してテキストを抽出し、表示します。 コードを実行する前に、ファイル パスが正しいことと、OCR パッケージがインストールされていることを確認してください。
Curtis Chauは、カールトン大学でコンピュータサイエンスの学士号を取得し、Node.js、TypeScript、JavaScript、およびReactに精通したフロントエンド開発を専門としています。直感的で美しいユーザーインターフェースを作成することに情熱を持ち、Curtisは現代のフレームワークを用いた開発や、構造の良い視覚的に魅力的なマニュアルの作成を楽しんでいます。