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.Turkish の内容

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

  • トルコ語
  • トルコのベスト
  • トルコファースト

ダウンロード

トルコ語言語パック[トルコ語]

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

インストール

最初の手順は、次の NuGet パッケージ マネージャー コマンドを使用して、.NET プロジェクトにトルコ語OCR パッケージをインストールすることです。

Install-Package IronOCR.Languages.Turkish

Code Example

この C# コード例は、画像または PDF ドキュメントからトルコ語のテキストを読み取る方法を示しています。

// Import the IronOcr namespace
using IronOcr;

class OCRExample
{
    static void Main()
    {
        // Create a new IronTesseract object
        var Ocr = new IronTesseract();

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

        // Define the input using a path to the image or PDF file
        using (var Input = new OcrInput(@"images\Turkish.png"))
        {
            // Perform the OCR reading operation
            var Result = Ocr.Read(Input);

            // Retrieve the text from the OCR result
            var AllText = Result.Text;

            // Print the extracted text to the console
            Console.WriteLine(AllText);
        }
    }
}
// Import the IronOcr namespace
using IronOcr;

class OCRExample
{
    static void Main()
    {
        // Create a new IronTesseract object
        var Ocr = new IronTesseract();

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

        // Define the input using a path to the image or PDF file
        using (var Input = new OcrInput(@"images\Turkish.png"))
        {
            // Perform the OCR reading operation
            var Result = Ocr.Read(Input);

            // Retrieve the text from the OCR result
            var AllText = Result.Text;

            // Print the extracted text to the console
            Console.WriteLine(AllText);
        }
    }
}
' Import the IronOcr namespace
Imports IronOcr

Friend Class OCRExample
	Shared Sub Main()
		' Create a new IronTesseract object
		Dim Ocr = New IronTesseract()

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

		' Define the input using a path to the image or PDF file
		Using Input = New OcrInput("images\Turkish.png")
			' Perform the OCR reading operation
			Dim Result = Ocr.Read(Input)

			' Retrieve the text from the OCR result
			Dim AllText = Result.Text

			' Print the extracted text to the console
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel

このコードは、IronOCR を使用して OCR プロセスを設定し、入力画像からトルコ語のテキストを読み取ります。 次に、抽出されたテキストをコンソールに出力します。