C# と .NET でのカザフ語 OCR

This article was translated from English: Does it need improvement?
Translated
View the article in English
Other versions of this document:

*カザフ語

IronOCR は、.NET コーダーがカザフ語を含む 126 の言語で画像や PDF ドキュメントからテキストを読み取ることを可能にする C# ソフトウェア コンポーネントです。

これは、特に.NET開発者向けに構築されたTesseractの高度なフォークであり、速度と精度の両方で他のTesseractエンジンを定期的に上回ります。

IronOcr.Languages.Kazakh の内容

このパッケージには、.NET 用の 43 の OCR 言語が含まれています。

  • カザフ語
  • カザフ語ベスト
  • カザフスタンファースト

ダウンロード

カザフ語言語パック[カザフ語]

  • Zip形式でダウンロード
  • NuGetでインストール

インストール

最初に、カザフ語OCR パッケージを .NET プロジェクトにインストールする必要があります。

Install-Package IronOCR.Languages.Kazakh

Code Example

この C# コード例は、画像または PDF ドキュメントからカザフ語のテキストを読み取ります。

// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Initialize the IronTesseract OCR class
        var Ocr = new IronTesseract();

        // Set the OCR language to Kazakh
        Ocr.Language = OcrLanguage.Kazakh;

        // Use a 'using' statement to manage resources efficiently
        using (var Input = new OcrInput(@"images\Kazakh.png"))
        {
            // Perform OCR on the input image
            var Result = Ocr.Read(Input);

            // Retrieve and store the recognized text
            var AllText = Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Initialize the IronTesseract OCR class
        var Ocr = new IronTesseract();

        // Set the OCR language to Kazakh
        Ocr.Language = OcrLanguage.Kazakh;

        // Use a 'using' statement to manage resources efficiently
        using (var Input = new OcrInput(@"images\Kazakh.png"))
        {
            // Perform OCR on the input image
            var Result = Ocr.Read(Input);

            // Retrieve and store the recognized text
            var AllText = Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
' Import the IronOcr namespace
Imports IronOcr

Friend Class Program
	Shared Sub Main()
		' Initialize the IronTesseract OCR class
		Dim Ocr = New IronTesseract()

		' Set the OCR language to Kazakh
		Ocr.Language = OcrLanguage.Kazakh

		' Use a 'using' statement to manage resources efficiently
		Using Input = New OcrInput("images\Kazakh.png")
			' Perform OCR on the input image
			Dim Result = Ocr.Read(Input)

			' Retrieve and store the recognized text
			Dim AllText = Result.Text

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

このコードは、カザフ語用に構成された IronOCR を使用して、 Kazakh.pngという名前の画像ファイルに対して光学式文字認識 (OCR) を実行する方法を示しています。 認識されたテキストが抽出され、コンソールに出力されます。