Cherokee OCR in C

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

他126の言語

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

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

IronOcr.Languages.Cherokee の内容

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

  • CherokeeAlphabet
  • CherokeeAlphabetBest
  • CherokeeAlphabetFast
  • Cherokee
  • CherokeeBest
  • チェロキーファスト

ダウンロード

チェロキー言語パック[ᏣᎳᎩ ᎦᏬᏂᎯᏍᏗ]

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

インストール

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

Install-Package IronOcr.Languages.Cherokee

Code Example

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

// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Create an instance of the IronTesseract class
        var Ocr = new IronTesseract();

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

        // Use OcrInput to specify the image or PDF to be read
        using (var Input = new OcrInput(@"images\Cherokee.png"))
        {
            // Perform OCR on the input document
            var Result = Ocr.Read(Input);

            // Extract all recognized text
            var AllText = Result.Text;

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

class Program
{
    static void Main()
    {
        // Create an instance of the IronTesseract class
        var Ocr = new IronTesseract();

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

        // Use OcrInput to specify the image or PDF to be read
        using (var Input = new OcrInput(@"images\Cherokee.png"))
        {
            // Perform OCR on the input document
            var Result = Ocr.Read(Input);

            // Extract all recognized text
            var AllText = Result.Text;

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

Friend Class Program
	Shared Sub Main()
		' Create an instance of the IronTesseract class
		Dim Ocr = New IronTesseract()

		' Set the language for OCR to Cherokee
		Ocr.Language = OcrLanguage.Cherokee

		' Use OcrInput to specify the image or PDF to be read
		Using Input = New OcrInput("images\Cherokee.png")
			' Perform OCR on the input document
			Dim Result = Ocr.Read(Input)

			' Extract all recognized text
			Dim AllText = Result.Text

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

コードの動作を簡単に説明します。

  • IronTesseract: OCR 操作を処理するために IronTesseract クラスのインスタンスが作成されます。
  • OcrLanguage.Cherokee: OcrLanguage.Cherokee プロパティを使用して言語をチェロキー語に設定します。これにより、OCR エンジンはチェロキー語のテキストを認識するようになります。
  • OcrInput: 画像またはPDFドキュメントが格納されている場所への入力パスが、OcrInputクラスに指定されます。
  • Ocr.Read: OCR オブジェクトに対して Read メソッドを呼び出し、入力データを渡します。 OCR 処理を実行します。
  • Result.Text: 結果から認識されたテキストを抽出し、後で使用するために AllText 変数に格納します。 -コンソール出力:認識されたテキストがコンソールに出力されます。