使用 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.Uyghur 的内容

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

  • 维吾尔语
  • UyghurBest
  • 维吾尔语快速识别

下载

维吾尔语语言包[Uyƣurqə]

安装

我们首先需要做的就是将我们的维吾尔语OCR 包安装到您的 .NET 项目中。

Install-Package IronOCR.Languages.Uyghur

代码示例

这段 C# 代码示例从图像或 PDF 文档中读取维吾尔语文本。

using IronOcr;

var Ocr = new IronTesseract();
// Set the OCR language to Uyghur. This is necessary to correctly read Uyghur text.
Ocr.Language = OcrLanguage.Uyghur;

// Create an OCR input object from a file. This can be an image or a PDF.
using (var Input = new OcrInput(@"images\Uyghur.png"))
{
    // Perform text recognition on the input data.
    var Result = Ocr.Read(Input);

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

    // Additional processing of AllText can be done here.
}
using IronOcr;

var Ocr = new IronTesseract();
// Set the OCR language to Uyghur. This is necessary to correctly read Uyghur text.
Ocr.Language = OcrLanguage.Uyghur;

// Create an OCR input object from a file. This can be an image or a PDF.
using (var Input = new OcrInput(@"images\Uyghur.png"))
{
    // Perform text recognition on the input data.
    var Result = Ocr.Read(Input);

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

    // Additional processing of AllText can be done here.
}
Imports IronOcr

Private Ocr = New IronTesseract()
' Set the OCR language to Uyghur. This is necessary to correctly read Uyghur text.
Ocr.Language = OcrLanguage.Uyghur

' Create an OCR input object from a file. This can be an image or a PDF.
Using Input = New OcrInput("images\Uyghur.png")
	' Perform text recognition on the input data.
	Dim Result = Ocr.Read(Input)

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

	' Additional processing of AllText can be done here.
End Using
$vbLabelText   $csharpLabel