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.Esperanto 的内容

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

世界语 世界语Best 世界语Fast

下载

世界语语言包 [世界语]

安装

我们首先需要做的是将我们的世界语OCR 包安装到您的 .NET 项目中。

Install-Package IronOCR.Languages.Esperanto

代码示例

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

// This example demonstrates how to perform OCR on an image file using the IronOCR library with Esperanto language support.
using IronOcr;

var Ocr = new IronTesseract
{
    Language = OcrLanguage.Esperanto // Specify the OCR language as Esperanto
};

using (var Input = new OcrInput(@"images\Esperanto.png")) // Load an image from the file path
{
    var Result = Ocr.Read(Input); // Perform OCR to read the text from the image
    var AllText = Result.Text; // Extract the recognized text from the result
    // You can now use AllText for further processing
}
// This example demonstrates how to perform OCR on an image file using the IronOCR library with Esperanto language support.
using IronOcr;

var Ocr = new IronTesseract
{
    Language = OcrLanguage.Esperanto // Specify the OCR language as Esperanto
};

using (var Input = new OcrInput(@"images\Esperanto.png")) // Load an image from the file path
{
    var Result = Ocr.Read(Input); // Perform OCR to read the text from the image
    var AllText = Result.Text; // Extract the recognized text from the result
    // You can now use AllText for further processing
}
' This example demonstrates how to perform OCR on an image file using the IronOCR library with Esperanto language support.
Imports IronOcr

Private Ocr = New IronTesseract With {.Language = OcrLanguage.Esperanto}

Using Input = New OcrInput("images\Esperanto.png") ' Load an image from the file path
	Dim Result = Ocr.Read(Input) ' Perform OCR to read the text from the image
	Dim AllText = Result.Text ' Extract the recognized text from the result
	' You can now use AllText for further processing
End Using
$vbLabelText   $csharpLabel