Icelandic OCR in C# and .NET
このドキュメントの他のバージョン:
IronOCR は、.NET コーダーがアイスランド語を含む 126 の言語で画像や PDF ドキュメントからテキストを読み取ることを可能にする C# ソフトウェア コンポーネントです。 これは、.NET 開発者専用に構築された Tesseract の高度なフォークであり、速度と精度の両方で他の Tesseract エンジンを常に上回っています。
IronOcr.Languages.Icelandic の内容
このパッケージには、.NET 用の 52 の OCR 言語が含まれています。
- アイスランド語
- アイスランド語ベスト
- アイスランドファースト
ダウンロード
アイスランド語言語パック[アイスランド語]
インストール
最初に、アイスランド語のOCR パッケージを .NET プロジェクトにインストールする必要があります。
Install-Package IronOcr.Languages.Icelandic
Code Example
この C# コード例は、画像または PDF ドキュメントからアイスランド語のテキストを読み取ります。
using IronOcr;
class Program
{
static void Main()
{
// Create an instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Icelandic
Ocr.Language = OcrLanguage.Icelandic;
// Load the image or PDF file to be processed
using (var Input = new OcrInput(@"images\Icelandic.png"))
{
// Perform OCR on the input file
var Result = Ocr.Read(Input);
// Extract all recognized text from the result
var AllText = Result.Text;
// Print the extracted text to the console
System.Console.WriteLine(AllText);
}
}
}
using IronOcr;
class Program
{
static void Main()
{
// Create an instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Icelandic
Ocr.Language = OcrLanguage.Icelandic;
// Load the image or PDF file to be processed
using (var Input = new OcrInput(@"images\Icelandic.png"))
{
// Perform OCR on the input file
var Result = Ocr.Read(Input);
// Extract all recognized text from the result
var AllText = Result.Text;
// Print the extracted text to the console
System.Console.WriteLine(AllText);
}
}
}
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create an instance of the IronTesseract OCR engine
Dim Ocr = New IronTesseract()
' Set the language to Icelandic
Ocr.Language = OcrLanguage.Icelandic
' Load the image or PDF file to be processed
Using Input = New OcrInput("images\Icelandic.png")
' Perform OCR on the input file
Dim Result = Ocr.Read(Input)
' Extract all recognized text from the result
Dim AllText = Result.Text
' Print the extracted text to the console
System.Console.WriteLine(AllText)
End Using
End Sub
End Class
説明
IronTesseractクラスはIronOCRライブラリの一部であり、OCR 操作を実行するために設計されています。Ocr.Language = OcrLanguage.Icelandic;は OCR 言語をアイスランド語に設定します。OcrInputは入力ファイル (画像または PDF) へのパスを取得し、処理のために準備します。Ocr.Read(Input)入力ファイルを処理し、OCR 結果を返します。Result.Textは、処理された入力から認識されたすべてのテキストを取得します。
この例を正常に実行するには、.NET プロジェクトに IronOCR ライブラリとそのアイスランド語言語パッケージがインストールされていることを確認してください。

