Irish OCR in C# and .NET
このドキュメントの他のバージョン:
IronOCRは、.NET開発者が126言語の画像やPDFドキュメントからテキストを読み取ることを可能にするC#ソフトウェアコンポーネントです。アイルランド語を含みます。
これはTesseractの高度なフォークであり、.NET開発者専用に構築され、速度と精度の両方で他のTesseractエンジンを定期的に上回ります。
IronOcr.Languages.Irishの内容
このパッケージには.NET用の40のOCR言語が含まれています:
- アイルランド語
- アイリッシュベスト
- アイリッシュファースト
ダウンロード
アイルランド語パック[アイルランド語]
インストール
最初に、アイルランド語OCR パッケージを .NET プロジェクトにインストールする必要があります。
Install-Package IronOcr.Languages.Irish
Code Example
この C# コード例は、画像または PDF ドキュメントからアイルランド語のテキストを読み取ります。
// Install the IronOCR Irish language package via NuGet:
// PM> Install-Package IronOcr.Languages.Irish
using IronOcr;
class IrishOcrExample
{
static void Main()
{
// Create a new instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Irish for OCR processing
Ocr.Language = OcrLanguage.Irish;
// Using the OCR input, specify the path to the image containing Irish text
using (var Input = new OcrInput(@"images\Irish.png"))
{
// Perform OCR to read the Irish text from the image
var Result = Ocr.Read(Input);
// Get the recognized text as a string from the OCR result
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
// Install the IronOCR Irish language package via NuGet:
// PM> Install-Package IronOcr.Languages.Irish
using IronOcr;
class IrishOcrExample
{
static void Main()
{
// Create a new instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Irish for OCR processing
Ocr.Language = OcrLanguage.Irish;
// Using the OCR input, specify the path to the image containing Irish text
using (var Input = new OcrInput(@"images\Irish.png"))
{
// Perform OCR to read the Irish text from the image
var Result = Ocr.Read(Input);
// Get the recognized text as a string from the OCR result
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
Imports IronOcr
Module IrishOcrExample
Sub Main()
' Create a new instance of the IronTesseract OCR engine
Dim Ocr As New IronTesseract()
' Set the language to Irish for OCR processing
Ocr.Language = OcrLanguage.Irish
' Using the OCR input, specify the path to the image containing Irish text
Using Input As New OcrInput("images\Irish.png")
' Perform OCR to read the Irish text from the image
Dim Result = Ocr.Read(Input)
' Get the recognized text as a string from the OCR result
Dim AllText As String = Result.Text
' Output the recognized text
Console.WriteLine(AllText)
End Using
End Sub
End Module
この例では、IronOCR ライブラリの IronTesseract クラスを利用して、アイルランド語で書かれたテキストを含む画像に対して OCR を実行します。 OcrInput オブジェクトはイメージを読み込むために使用され、Ocr.Read メソッドはイメージを処理してテキストを抽出します。 結果のテキストは AllText 変数に保存され、コンソールに出力されます。

