使用 C# 和 .NET 進行因紐特語 OCR 識別

This article was translated from English: Does it need improvement?
Translated
View the article in English

還有126種語言

IronOCR 是一個 C# 軟體元件,允許 .NET 程式設計師從圖像和 PDF 文件中讀取 126 種語言(包括因紐特語)的文字。

它是 Tesseract 的一個高級分支,專為 .NET 開發人員構建,在速度和準確性方面通常優於其他 Tesseract 引擎。

IronOcr.Languages.Inuktitut 的內容

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

因紐特語

  • InuktitutBest
  • InuktitutFast

下載

因紐特語語言包

下載為Zip 檔案

安裝

第一步是在您的 .NET 專案中安裝因紐特語OCR 套件:

Install-Package IronOCR.Languages.Inuktitut

程式碼範例

這段 C# 程式碼範例從圖像或 PDF 文件中讀取因紐特語文字。

// First, make sure to install the IronOcr.Languages.Inuktitut package:
// PM> Install-Package IronOcr.Languages.Inuktitut

using IronOcr;

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

        // Specify the OCR language as Inuktitut
        Ocr.Language = OcrLanguage.Inuktitut;

        // Define the input image or PDF file containing Inuktitut text
        using (var Input = new OcrInput(@"images\Inuktitut.png"))
        {
            // Perform OCR on the input file
            var Result = Ocr.Read(Input);

            // Extract and print the recognized text
            var AllText = Result.Text;
            Console.WriteLine("Recognized Inuktitut Text:");
            Console.WriteLine(AllText);
        }
    }
}
// First, make sure to install the IronOcr.Languages.Inuktitut package:
// PM> Install-Package IronOcr.Languages.Inuktitut

using IronOcr;

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

        // Specify the OCR language as Inuktitut
        Ocr.Language = OcrLanguage.Inuktitut;

        // Define the input image or PDF file containing Inuktitut text
        using (var Input = new OcrInput(@"images\Inuktitut.png"))
        {
            // Perform OCR on the input file
            var Result = Ocr.Read(Input);

            // Extract and print the recognized text
            var AllText = Result.Text;
            Console.WriteLine("Recognized Inuktitut Text:");
            Console.WriteLine(AllText);
        }
    }
}
' First, make sure to install the IronOcr.Languages.Inuktitut package:
' PM> Install-Package IronOcr.Languages.Inuktitut

Imports IronOcr

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

		' Specify the OCR language as Inuktitut
		Ocr.Language = OcrLanguage.Inuktitut

		' Define the input image or PDF file containing Inuktitut text
		Using Input = New OcrInput("images\Inuktitut.png")
			' Perform OCR on the input file
			Dim Result = Ocr.Read(Input)

			' Extract and print the recognized text
			Dim AllText = Result.Text
			Console.WriteLine("Recognized Inuktitut Text:")
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel

這段程式碼示範如何使用 IronOCR 從圖像中辨識因紐特文字。 將語言設定為因紐特語後,程式碼會處理指定的圖像檔案並將識別出的文字列印到控制台。