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

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

  • リトアニア語
  • リトアニア語ベスト
  • リトアニアファースト

ダウンロード

リトアニア語言語パック[リトアニア語]

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

インストール

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

Install-Package IronOCR.Languages.Lithuanian

Code Example

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

// Include the IronOcr namespace to use OCR features
using IronOcr;

class Program
{
    static void Main(string[] args)
    {
        // Create a new instance of the IronTesseract class
        var Ocr = new IronTesseract();

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

        // Use a using statement to ensure that the OcrInput object is disposed of properly
        using (var Input = new OcrInput(@"images\Lithuanian.png"))
        {
            // Perform OCR on the input image and store the result
            var Result = Ocr.Read(Input);

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

            // For demonstration purposes, output the extracted text to the console
            Console.WriteLine(AllText);
        }
    }
}
// Include the IronOcr namespace to use OCR features
using IronOcr;

class Program
{
    static void Main(string[] args)
    {
        // Create a new instance of the IronTesseract class
        var Ocr = new IronTesseract();

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

        // Use a using statement to ensure that the OcrInput object is disposed of properly
        using (var Input = new OcrInput(@"images\Lithuanian.png"))
        {
            // Perform OCR on the input image and store the result
            var Result = Ocr.Read(Input);

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

            // For demonstration purposes, output the extracted text to the console
            Console.WriteLine(AllText);
        }
    }
}
' Include the IronOcr namespace to use OCR features
Imports IronOcr

Friend Class Program
	Shared Sub Main(ByVal args() As String)
		' Create a new instance of the IronTesseract class
		Dim Ocr = New IronTesseract()

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

		' Use a using statement to ensure that the OcrInput object is disposed of properly
		Using Input = New OcrInput("images\Lithuanian.png")
			' Perform OCR on the input image and store the result
			Dim Result = Ocr.Read(Input)

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

			' For demonstration purposes, output the extracted text to the console
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel