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

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

  • ヨルバ語
  • ヨルバ語ベスト
  • ヨルバファスト

ダウンロード

ヨルバ語言語パック[ヨルバ語]

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

インストール

最初のタスクは、 Yoruba OCR パッケージを .NET プロジェクトにインストールすることです。

Install-Package IronOCR.Languages.Yoruba

Code Example

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

// Remember to install the package first:
// PM> Install-Package IronOcr.Languages.Yoruba

using IronOcr;

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

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

        // Specify the image or PDF file to read
        using (var Input = new OcrInput(@"images\Yoruba.png"))
        {
            // Perform OCR on the input file
            var Result = Ocr.Read(Input);

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

            // Output the recognized text
            Console.WriteLine("Recognized Text: ");
            Console.WriteLine(AllText);
        }
    }
}
// Remember to install the package first:
// PM> Install-Package IronOcr.Languages.Yoruba

using IronOcr;

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

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

        // Specify the image or PDF file to read
        using (var Input = new OcrInput(@"images\Yoruba.png"))
        {
            // Perform OCR on the input file
            var Result = Ocr.Read(Input);

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

            // Output the recognized text
            Console.WriteLine("Recognized Text: ");
            Console.WriteLine(AllText);
        }
    }
}
$vbLabelText   $csharpLabel

コード内のコメントは、言語の設定から認識されたテキストの抽出と印刷までの各ステップを説明しています。 この例では、ヨルバ語を指定して画像または PDF ファイルを処理することにより、IronOCR を使用してヨルバ語のテキストを読み取ることに重点を置いています。