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# ソフトウェア コンポーネントです。

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

IronOcr.Languages.Luxembourgish の内容

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

  • ルクセンブルク語
  • ルクセンブルク語ベスト
  • ルクセンブルクファースト

ダウンロード

ルクセンブルク語言語パック[ルクセンブルク語]

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

インストール

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

Install-Package IronOCR.Languages.Luxembourgish

Code Example

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

// Import the IronOcr namespace to utilize OCR functions
using IronOcr;

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

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

        // Load the input image or PDF from which to extract the text
        using (var Input = new OcrInput(@"images\Luxembourgish.png"))
        {
            // Perform OCR on the input document
            var Result = Ocr.Read(Input);

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

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

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

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

        // Load the input image or PDF from which to extract the text
        using (var Input = new OcrInput(@"images\Luxembourgish.png"))
        {
            // Perform OCR on the input document
            var Result = Ocr.Read(Input);

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

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

Friend Class Program
	Shared Sub Main()
		' Create a new instance of IronTesseract to perform OCR
		Dim Ocr = New IronTesseract()

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

		' Load the input image or PDF from which to extract the text
		Using Input = New OcrInput("images\Luxembourgish.png")
			' Perform OCR on the input document
			Dim Result = Ocr.Read(Input)

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

			' Output the recognized text
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel
  • この例では、IronOCR を使用してローカル ドキュメントからルクセンブルク語のテキストを認識する方法を示します。
  • ルクセンブルク語のテキストの認識精度を高めるために、言語はルクセンブルク語に設定されています。
  • OcrInput()は、入力画像または PDF ファイルを指定するために使用されます。
  • Ocr.Read()はドキュメントを処理し、認識されたテキストはResult.Textを介してアクセスされます。