C# 和 .NET 中的斯洛維尼亞語 OCR

This article was translated from English: Does it need improvement?
Translated
View the article in English
Other versions of this document:

在斯洛維尼亞語 新增 125 種 OCR 語言

IronOCR 是一個 C# 軟體元件,它允許 .NET 開發人員從圖像和 PDF 文件中讀取 126 種語言(包括斯洛維尼亞語)的文字。 它是 Tesseract 的一個高級分支,專為 .NET 開發人員構建,在速度和準確性方面通常優於其他 Tesseract 引擎。

IronOcr.Languages.Slovene 的內容

此軟體包包含 46 種適用於 .NET 的 OCR 語言:

  • 斯洛維尼亞語
  • SloveneBest
  • SloveneFast

下載

斯洛維尼亞語語言包[斯洛維尼亞語]

安裝

首先,你需要將斯洛維尼亞語OCR 套件安裝到你的 .NET 專案中。

Install-Package IronOCR.Languages.Slovene

程式碼範例

此 C# 程式碼範例示範如何從圖像或 PDF 文件中讀取斯洛維尼亞語文字。

// Install the package before using it.
// PM> Install-Package IronOcr.Languages.Slovene

using IronOcr;

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

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

        // Perform OCR inside a using block to ensure resources are released properly.
        using (var Input = new OcrInput(@"images\Slovene.png"))
        {
            // Read the text from the input image or PDF.
            var Result = Ocr.Read(Input);

            // Get all the recognized text as a string.
            var AllText = Result.Text;

            // Output the recognized text to the console.
            System.Console.WriteLine(AllText);
        }
    }
}
// Install the package before using it.
// PM> Install-Package IronOcr.Languages.Slovene

using IronOcr;

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

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

        // Perform OCR inside a using block to ensure resources are released properly.
        using (var Input = new OcrInput(@"images\Slovene.png"))
        {
            // Read the text from the input image or PDF.
            var Result = Ocr.Read(Input);

            // Get all the recognized text as a string.
            var AllText = Result.Text;

            // Output the recognized text to the console.
            System.Console.WriteLine(AllText);
        }
    }
}
' Install the package before using it.
' PM> Install-Package IronOcr.Languages.Slovene

Imports IronOcr

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

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

		' Perform OCR inside a using block to ensure resources are released properly.
		Using Input = New OcrInput("images\Slovene.png")
			' Read the text from the input image or PDF.
			Dim Result = Ocr.Read(Input)

			' Get all the recognized text as a string.
			Dim AllText = Result.Text

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