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 是一个 C# 软件组件,允许 .NET 程序员从图像和 PDF 文档中读取 126 种语言(包括格鲁吉亚语)的文本。

它是 Tesseract 的一个高级分支,专为 .NET 开发人员构建,在速度和准确性方面通常优于其他 Tesseract 引擎。

IronOcr.Languages.Georgian 的内容

此软件包包含 176 种适用于 .NET 的 OCR 语言:

  • 格鲁吉亚字母
  • 格鲁吉亚字母表最佳
  • 格鲁吉亚字母速记
  • 格鲁吉亚
  • GeorgianBest
  • GeorgianFast
  • 格鲁吉亚语旧版
  • GeorgianOldBest
  • 格鲁吉亚语旧版快速

下载

格鲁吉亚语语言包 [格鲁吉亚语]

安装

我们首先需要做的就是在您的 .NET 项目中安装Georgian OCR 包。

Install-Package IronOcr.Languages.Georgian

代码示例

此 C# 代码示例演示了如何使用 IronOCR 库从图像或 PDF 文档中读取格鲁吉亚语文本。

// Ensure that the IronOCR library and the Georgian language pack are installed.
// You can install the package using the following NuGet command:
// PM> Install-Package IronOcr.Languages.Georgian

using IronOcr;

class Program
{
    static void Main()
    {
        // Initialize a new instance of the IronTesseract class
        var Ocr = new IronTesseract();

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

        // Use a using statement to manage resources efficiently
        using (var Input = new OcrInput(@"images\Georgian.png"))
        {
            // Read the image and extract text
            var Result = Ocr.Read(Input);

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

            // Output the recognized text to the console
            Console.WriteLine("Recognized Text: " + AllText);
        }
    }
}
// Ensure that the IronOCR library and the Georgian language pack are installed.
// You can install the package using the following NuGet command:
// PM> Install-Package IronOcr.Languages.Georgian

using IronOcr;

class Program
{
    static void Main()
    {
        // Initialize a new instance of the IronTesseract class
        var Ocr = new IronTesseract();

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

        // Use a using statement to manage resources efficiently
        using (var Input = new OcrInput(@"images\Georgian.png"))
        {
            // Read the image and extract text
            var Result = Ocr.Read(Input);

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

            // Output the recognized text to the console
            Console.WriteLine("Recognized Text: " + AllText);
        }
    }
}
' Ensure that the IronOCR library and the Georgian language pack are installed.
' You can install the package using the following NuGet command:
' PM> Install-Package IronOcr.Languages.Georgian

Imports IronOcr

Friend Class Program
	Shared Sub Main()
		' Initialize a new instance of the IronTesseract class
		Dim Ocr = New IronTesseract()

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

		' Use a using statement to manage resources efficiently
		Using Input = New OcrInput("images\Georgian.png")
			' Read the image and extract text
			Dim Result = Ocr.Read(Input)

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

			' Output the recognized text to the console
			Console.WriteLine("Recognized Text: " & AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel

该脚本初始化一个配置为格鲁吉亚语的 OCR 引擎,处理指定的图像文件,并输出提取的文本。