Sundanese OCR in C# and .NET
このドキュメントの他のバージョン:
IronOCR は、.NET コーダーがスンダ語を含む 126 の言語で画像や PDF ドキュメントからテキストを読み取ることを可能にする C# ソフトウェア コンポーネントです。
これはTesseractの高度なフォークであり、.NET開発者専用に構築され、速度と精度の両方で他のTesseractエンジンを定期的に上回ります。
IronOcr.Languages.Sundanese の内容
このパッケージには、.NET 用の 52 の OCR 言語が含まれています。
- スンダ語
- スンダ語Best
- スンダファースト
ダウンロード
スンダ語言語パック[スンダ語]
インストール
最初に、 Sundanese OCR パッケージを .NET プロジェクトにインストールする必要があります。
Install-Package IronOcr.Languages.Sundanese
Code Example
この C# コード例は、画像または PDF ドキュメントからスンダ語のテキストを読み取ります。
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Specify the language the OCR engine should use
Ocr.Language = OcrLanguage.Sundanese;
// Initialize the OCR input with an image file containing Sundanese text
using (var Input = new OcrInput(@"images\Sundanese.png"))
{
// Process the input and get the result
var Result = Ocr.Read(Input);
// Extract all recognized text from the result
var AllText = Result.Text;
// Output the recognized text
System.Console.WriteLine(AllText);
}
}
}
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Specify the language the OCR engine should use
Ocr.Language = OcrLanguage.Sundanese;
// Initialize the OCR input with an image file containing Sundanese text
using (var Input = new OcrInput(@"images\Sundanese.png"))
{
// Process the input and get the result
var Result = Ocr.Read(Input);
// Extract all recognized text from the result
var AllText = Result.Text;
// Output the recognized text
System.Console.WriteLine(AllText);
}
}
}
' Import the IronOcr namespace
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create a new instance of the IronTesseract class
Dim Ocr = New IronTesseract()
' Specify the language the OCR engine should use
Ocr.Language = OcrLanguage.Sundanese
' Initialize the OCR input with an image file containing Sundanese text
Using Input = New OcrInput("images\Sundanese.png")
' Process the input and get the result
Dim Result = Ocr.Read(Input)
' Extract all recognized text from the result
Dim AllText = Result.Text
' Output the recognized text
System.Console.WriteLine(AllText)
End Using
End Sub
End Class
説明
- 最初にOCR機能を使用するために
IronOcr名前空間をインポートします。 - 当社の主なOCRエンジンとして機能する
IronTesseractのインスタンスを作成します。 - エンジンがスンダ語のテキストを読み込むように
OcrLanguage.Sundaneseに設定します。 - OCRエンジン用の画像ファイルソースを指定する
OcrInputオブジェクトを作成します。 Readメソッドが入力を処理し、テキストを認識しようとします。- 認識されたテキストは
AllText変数に格納され、その後コンソールに出力されます。
この設定により、.NET 環境で IronOCR ライブラリを使用して、画像からスンダ語のテキストを堅牢に認識できるようになります。

