C# と .NET でのボスニア語 OCR
Other versions of this document:
IronOCR は、.NET コーダーがボスニア語を含む 126 の言語で画像や PDF ドキュメントからテキストを読み取ることを可能にする C# ソフトウェア コンポーネントです。
これは、.NET 開発者専用に構築された Tesseract の高度なフォークであり、速度と精度の両方で他の Tesseract エンジンを常に上回っています。
IronOcr.Languages.Bosnianの内容
このパッケージには、.NET 用の 46 の OCR 言語が含まれています。
- ボスニア語
- ボスニア語ベスト
- ボスニアファースト
ダウンロード
ボスニア語パック[ボスニア語]
インストール
最初に、ボスニア語OCR パッケージを .NET プロジェクトにインストールする必要があります。
Install-Package IronOCR.Languages.Bosnian
Code Example
この C# コード例は、画像または PDF ドキュメントからボスニア語のテキストを読み取ります。
// Ensure the IronOCR library is included
using IronOcr;
class Program
{
static void Main()
{
// Initialize an instance of IronTesseract
var Ocr = new IronTesseract();
// Set the OCR language to Bosnian
Ocr.Language = OcrLanguage.Bosnian;
// Use OcrInput to specify the input file path for OCR
using (var Input = new OcrInput(@"images\Bosnian.png"))
{
// Perform OCR on the input image or PDF
var Result = Ocr.Read(Input);
// Extract the recognized text from the result
var AllText = Result.Text;
// Output the recognized text to the console
Console.WriteLine(AllText);
}
}
}// Ensure the IronOCR library is included
using IronOcr;
class Program
{
static void Main()
{
// Initialize an instance of IronTesseract
var Ocr = new IronTesseract();
// Set the OCR language to Bosnian
Ocr.Language = OcrLanguage.Bosnian;
// Use OcrInput to specify the input file path for OCR
using (var Input = new OcrInput(@"images\Bosnian.png"))
{
// Perform OCR on the input image or PDF
var Result = Ocr.Read(Input);
// Extract the recognized text from the result
var AllText = Result.Text;
// Output the recognized text to the console
Console.WriteLine(AllText);
}
}
}' Ensure the IronOCR library is included
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Initialize an instance of IronTesseract
Dim Ocr = New IronTesseract()
' Set the OCR language to Bosnian
Ocr.Language = OcrLanguage.Bosnian
' Use OcrInput to specify the input file path for OCR
Using Input = New OcrInput("images\Bosnian.png")
' Perform OCR on the input image or PDF
Dim Result = Ocr.Read(Input)
' Extract the recognized text from the result
Dim AllText = Result.Text
' Output the recognized text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class- 上記のコードは、IronOCR を使用してボスニア語のテキスト画像に対して OCR を実行する方法を示しています。
IronTesseractクラスは、OCR タスクを構成および実行するために使用されます。OcrInputクラスは、テキストを抽出する入力画像ファイルを指定するために使用されます。- 最後に、認識されたテキストがコンソールに出力されます。





