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

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

  • スロバキア語
  • スロバキアベスト
  • SlovakFast
  • スロバキアの破砕

ダウンロード

スロバキア語言語パック [スロバキア語]:

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

インストール

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

Install-Package IronOCR.Languages.Slovak

Code Example

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

// Ensure you have installed the Slovak language pack for IronOCR
// PM> Install-Package IronOcr.Languages.Slovak

using IronOcr;

class SlovakOcrExample
{
    static void Main()
    {
        // Create an instance of IronTesseract for OCR processing
        var Ocr = new IronTesseract();

        // Set the language to Slovak
        Ocr.Language = OcrLanguage.Slovak;

        // Using an OcrInput to specify the source of the image or PDF
        using (var Input = new OcrInput(@"images\Slovak.png"))
        {
            // Perform OCR to read the text from the input image or PDF
            var Result = Ocr.Read(Input);

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

            // Output the extracted text to the console
            Console.WriteLine(AllText);
        }
    }
}
// Ensure you have installed the Slovak language pack for IronOCR
// PM> Install-Package IronOcr.Languages.Slovak

using IronOcr;

class SlovakOcrExample
{
    static void Main()
    {
        // Create an instance of IronTesseract for OCR processing
        var Ocr = new IronTesseract();

        // Set the language to Slovak
        Ocr.Language = OcrLanguage.Slovak;

        // Using an OcrInput to specify the source of the image or PDF
        using (var Input = new OcrInput(@"images\Slovak.png"))
        {
            // Perform OCR to read the text from the input image or PDF
            var Result = Ocr.Read(Input);

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

            // Output the extracted text to the console
            Console.WriteLine(AllText);
        }
    }
}
' Ensure you have installed the Slovak language pack for IronOCR
' PM> Install-Package IronOcr.Languages.Slovak

Imports IronOcr

Friend Class SlovakOcrExample
	Shared Sub Main()
		' Create an instance of IronTesseract for OCR processing
		Dim Ocr = New IronTesseract()

		' Set the language to Slovak
		Ocr.Language = OcrLanguage.Slovak

		' Using an OcrInput to specify the source of the image or PDF
		Using Input = New OcrInput("images\Slovak.png")
			' Perform OCR to read the text from the input image or PDF
			Dim Result = Ocr.Read(Input)

			' Extract all recognized text
			Dim AllText = Result.Text

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

この例では、IronOCR ライブラリを使用してスロバキア語のテキストを読み取る方法を示します。 まずIronTesseractのインスタンスを作成し、OCR の言語としてスロバキア語を指定し、 images/Slovak.pngにある入力画像を処理します。 最後に、画像から認識したテキストを抽出して出力します。