Serbian OCR in C# and .NET
Curtis Chau
更新日: 2026年8月2日
このドキュメントの他のバージョン:
IronOCR は、.NET コーダーがセルビア語を含む 126 の言語で画像や PDF ドキュメントからテキストを読み取ることを可能にする C# ソフトウェア コンポーネントです。 これはTesseractの高度なフォークであり、.NET開発者専用に構築され、速度と精度の両方で他のTesseractエンジンを定期的に上回ります。
IronOcr.Languages.Serbian の内容
このパッケージには、.NET 用の 105 個の OCR 言語が含まれています。
- セルビア語
- セルビア語ベスト
- セルビアファースト
- セルビア語Latin
- セルビア語ラテン語ベスト
- セルビア語LatinFast
ダウンロード
セルビア語言語パック[セルビア語]
- Zip としてダウンロード
- NuGetでインストール
インストール
最初に、セルビア語OCR パッケージを .NET プロジェクトにインストールする必要があります。
Code Example
この C# コード例は、画像または PDF ドキュメントからセルビア語のテキストを読み取ります。
// Ensure all necessary namespaces are imported
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of IronTesseract
var Ocr = new IronTesseract();
// Set the language to Serbian
Ocr.Language = OcrLanguage.Serbian;
// Use a using statement to ensure resources are disposed properly
using (var Input = new OcrInput(@"images\Serbian.png"))
{
// Perform OCR and store the result
var Result = Ocr.Read(Input);
// Extract all text from the OCR result
var AllText = Result.Text;
// Output the resulting text
Console.WriteLine(AllText);
}
}
}' Ensure all necessary namespaces are imported
Imports IronOcr
Module Program
Sub Main()
' Create a new instance of IronTesseract
Dim Ocr As New IronTesseract()
' Set the language to Serbian
Ocr.Language = OcrLanguage.Serbian
' Use a Using statement to ensure resources are disposed properly
Using Input As New OcrInput("images\Serbian.png")
' Perform OCR and store the result
Dim Result = Ocr.Read(Input)
' Extract all text from the OCR result
Dim AllText = Result.Text
' Output the resulting text
Console.WriteLine(AllText)
End Using
End Sub
End Module' Ensure all necessary namespaces are imported
Imports IronOcr
Module Program
Sub Main()
' Create a new instance of IronTesseract
Dim Ocr As New IronTesseract()
' Set the language to Serbian
Ocr.Language = OcrLanguage.Serbian
' Use a Using statement to ensure resources are disposed properly
Using Input As New OcrInput("images\Serbian.png")
' Perform OCR and store the result
Dim Result = Ocr.Read(Input)
' Extract all text from the OCR result
Dim AllText = Result.Text
' Output the resulting text
Console.WriteLine(AllText)
End Using
End Sub
End Moduleコードの説明:
- OCRを実行するために使用される新しい
IronTesseractのインスタンスを初期化します。 - OCRエンジンの言語は
OcrLanguage.Serbianを使用してセルビア語に設定されます。 OcrInputを使用してロードします。- 画像を処理してテキストを抽出するために、OCRオブジェクトに対して
Read関数が呼び出されます。 - 画像から抽出されたテキストは変数
AllTextに格納され、その後コンソールに出力されます。
テクニカルライター
Curtis Chauは、カールトン大学でコンピュータサイエンスの学士号を取得し、Node.js、TypeScript、JavaScript、およびReactに精通したフロントエンド開発を専門としています。直感的で美しいユーザーインターフェースを作成することに情熱を持ち、Curtisは現代のフレームワークを用いた開発や、構造の良い視覚的に魅力的なマニュアルの作成を楽しんでいます。