Working with Arabic Numerals in IronOCR

This article was translated from English: Does it need improvement?
Translated
View the article in English

アラビア語、ペルシア語、ウルドゥー語の言語パックがアラビア数字を認識しませんか?

これはTesseract言語パックの既知の問題です。

次の言語パックは、アラビア数字でこの問題に対処するのに役立つ可能性があります: Shreeshrii's Tessdata アラビア語.

これは、カスタム言語パックをロードするIronOCR機能と一緒に使用することができます: IronOCRカスタム言語の例

using IronOcr;

class ArabicNumeralOCR
{
    static void Main(string[] args)
    {
        // Initialize a new instance of IronTesseract for OCR
        var Ocr = new IronTesseract();

        // Load the custom Tesseract language file for better numeral recognition
        Ocr.UseCustomTesseractLanguageFile("custom_tesseract_files/custom.traineddata");

        // Specify the image input for OCR processing
        using (var Input = new OcrInput(@"images\image.png"))
        {
            // Execute the OCR process on the input image
            var Result = Ocr.Read(Input);

            // Output the recognized text
            Console.WriteLine(Result.Text);
        }
    }
}
using IronOcr;

class ArabicNumeralOCR
{
    static void Main(string[] args)
    {
        // Initialize a new instance of IronTesseract for OCR
        var Ocr = new IronTesseract();

        // Load the custom Tesseract language file for better numeral recognition
        Ocr.UseCustomTesseractLanguageFile("custom_tesseract_files/custom.traineddata");

        // Specify the image input for OCR processing
        using (var Input = new OcrInput(@"images\image.png"))
        {
            // Execute the OCR process on the input image
            var Result = Ocr.Read(Input);

            // Output the recognized text
            Console.WriteLine(Result.Text);
        }
    }
}
Imports IronOcr

Friend Class ArabicNumeralOCR
	Shared Sub Main(ByVal args() As String)
		' Initialize a new instance of IronTesseract for OCR
		Dim Ocr = New IronTesseract()

		' Load the custom Tesseract language file for better numeral recognition
		Ocr.UseCustomTesseractLanguageFile("custom_tesseract_files/custom.traineddata")

		' Specify the image input for OCR processing
		Using Input = New OcrInput("images\image.png")
			' Execute the OCR process on the input image
			Dim Result = Ocr.Read(Input)

			' Output the recognized text
			Console.WriteLine(Result.Text)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel

注意:このC#の例は、IronOCRでカスタムTesseract言語ファイルを使用し、画像内のアラビア数字の認識を向上させる方法を示しています。 適切な言語パックをダウンロードし、指定の場所に配置済みであることを前提としています。 必ずIronOCRをインストールし、本番コードに必要なエラー処理を追加してください。

Curtis Chau
テクニカルライター

Curtis Chauは、カールトン大学でコンピュータサイエンスの学士号を取得し、Node.js、TypeScript、JavaScript、およびReactに精通したフロントエンド開発を専門としています。直感的で美しいユーザーインターフェースを作成することに情熱を持ち、Curtisは現代のフレームワークを用いた開発や、構造の良い視覚的に魅力的なマニュアルの作成を楽しんでいます。

開発以外にも、CurtisはIoT(Internet of Things)への強い関心を持ち、ハードウェアとソフトウェアの統合方法を模索しています。余暇には、ゲームをしたりDiscordボットを作成したりして、技術に対する愛情と創造性を組み合わせています。

準備はいいですか?
Nuget ダウンロード 5,044,537 | バージョン: 2025.11 ただ今リリースされました