C# および .NET でのボスニア語 OCR
Curtis Chau
更新日: 2026年8月2日
このドキュメントの他のバージョン:
IronOCR は、.NET コーダーがボスニア語を含む 126 の言語で画像や PDF ドキュメントからテキストを読み取ることを可能にする C# ソフトウェア コンポーネントです。
これは、.NET 開発者専用に構築された Tesseract の高度なフォークであり、速度と精度の両方で他の Tesseract エンジンを常に上回っています。
IronOcr.Languages.Bosnian
このパッケージには、.NET 用の 46 の OCR 言語が含まれています。
- Bosnian
- BosnianBest
- BosnianFast
ダウンロード
ボスニア語パック[ボスニア語]
インストール
最初に、ボスニア語OCR パッケージを .NET プロジェクトにインストールする必要があります。
コード例
この 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
Imports IronOcr
Module Program
Sub Main()
' Initialize an instance of IronTesseract
Dim Ocr As New IronTesseract()
' Set the OCR language to Bosnian
Ocr.Language = OcrLanguage.Bosnian
' Use OcrInput to specify the input file path for OCR
Using Input As 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 Module' Ensure the IronOCR library is included
Imports IronOcr
Module Program
Sub Main()
' Initialize an instance of IronTesseract
Dim Ocr As New IronTesseract()
' Set the OCR language to Bosnian
Ocr.Language = OcrLanguage.Bosnian
' Use OcrInput to specify the input file path for OCR
Using Input As 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 Module- 上記のコードは、IronOCRを使用してボスニア語のテキスト画像でOCRを実行する方法を示しています。
IronTesseractクラスは、OCRタスクを設定し実行するために使用されます。OcrInputクラスは、テキストを抽出する入力画像ファイルを指定するのに使用されます。- 最後に、認識されたテキストがコンソールに印刷されます。
テクニカルライター
Curtis Chauは、カールトン大学でコンピュータサイエンスの学士号を取得し、Node.js、TypeScript、JavaScript、およびReactに精通したフロントエンド開発を専門としています。直感的で美しいユーザーインターフェースを作成することに情熱を持ち、Curtisは現代のフレームワークを用いた開発や、構造の良い視覚的に魅力的なマニュアルの作成を楽しんでいます。