C# と .NET での金融 OCR
IronOCR は、.NET コーダーが金融を含む 126 の言語で画像や PDF ドキュメントからテキストを読み取ることを可能にする C# ソフトウェア コンポーネントです。
これはTesseractの高度なフォークであり、.NET開発者専用に構築され、速度と精度の両方で他のTesseractエンジンを定期的に上回ります。
IronOcr.Languages.Financialの内容
このパッケージには、.NET 用の 16 の OCR 言語が含まれています。
- 金融
ダウンロード
インストール
最初に、 Financial OCR パッケージを .NET プロジェクトにインストールする必要があります。
Install-Package IronOCR.Languages.Financial
Code Example
この C# コード例は、画像または PDF ドキュメントから財務テキストを読み取ります。
// Import the IronOcr namespace
using IronOcr;
// Instantiate the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Financial
Ocr.Language = OcrLanguage.Financial;
// Create an OCR input object, specifying the path to the image or PDF
using (var Input = new OcrInput(@"images\Financial.png"))
{
// Perform OCR to read text from the input
var Result = Ocr.Read(Input);
// Retrieve the extracted text
var AllText = Result.Text;
}// Import the IronOcr namespace
using IronOcr;
// Instantiate the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Financial
Ocr.Language = OcrLanguage.Financial;
// Create an OCR input object, specifying the path to the image or PDF
using (var Input = new OcrInput(@"images\Financial.png"))
{
// Perform OCR to read text from the input
var Result = Ocr.Read(Input);
// Retrieve the extracted text
var AllText = Result.Text;
}' Import the IronOcr namespace
Imports IronOcr
' Instantiate the IronTesseract OCR engine
Private Ocr = New IronTesseract()
' Set the OCR language to Financial
Ocr.Language = OcrLanguage.Financial
' Create an OCR input object, specifying the path to the image or PDF
Using Input = New OcrInput("images\Financial.png")
' Perform OCR to read text from the input
Dim Result = Ocr.Read(Input)
' Retrieve the extracted text
Dim AllText = Result.Text
End Using説明:
- IronOcr の使用:この名前空間には、OCR プロセスに必要なすべてのクラスが含まれています。
- IronTesseract クラス:これは OCR タスクを有効にするメイン クラスです。 -言語設定:言語を
Financialに設定すると、OCR エンジンが金融用語を認識できるようになります。 - OcrInput クラス:処理する画像または PDF ファイルを指定するファイル パスを受け取ります。 -読み取りメソッド:
Ocr.Read(Input)で実行され、指定された入力と言語設定に基づいて画像を処理してテキストを取得します。 - Result.Text:画像または PDF から認識されたテキストを保存します。





