C# 和 .NET 中的意第绪语 OCR
This article was translated from English: Does it need improvement?
TranslatedView the article in English
Other versions of this document:
IronOCR 是一个 C# 软件组件,允许 .NET 程序员从图像和 PDF 文档中读取 126 种语言(包括意第绪语)的文本。
它是 Tesseract 的一个高级分支,专为 .NET 开发人员构建,在速度和准确性方面通常优于其他 Tesseract 引擎。
IronOcr.Languages.Yiddish 的内容
此软件包包含 46 种适用于 .NET 的 OCR 语言:
- 意第绪语
- YiddishBest
- YiddishFast
下载
意第绪语语言包[意第绪语]
安装
我们首先需要做的是将我们的意第绪语OCR 包安装到您的 .NET 项目中。
Install-Package IronOCR.Languages.Yiddish
代码示例
这段 C# 代码示例从图像或 PDF 文档中读取意第绪语文本。
// Import the IronOcr namespace
using IronOcr;
// Create a new instance of the IronTesseract class, which is responsible for performing OCR
var Ocr = new IronTesseract();
// Specify the language to be Yiddish
Ocr.Language = OcrLanguage.Yiddish;
// Using block ensures that resources are disposed of correctly
using (var Input = new OcrInput(@"images\Yiddish.png")) // Specify the path to your image file
{
// Perform the OCR operation on the input image
var Result = Ocr.Read(Input);
// Retrieve the recognized text
var AllText = Result.Text;
// Optionally, you can output or process the `AllText` variable as needed
}// Import the IronOcr namespace
using IronOcr;
// Create a new instance of the IronTesseract class, which is responsible for performing OCR
var Ocr = new IronTesseract();
// Specify the language to be Yiddish
Ocr.Language = OcrLanguage.Yiddish;
// Using block ensures that resources are disposed of correctly
using (var Input = new OcrInput(@"images\Yiddish.png")) // Specify the path to your image file
{
// Perform the OCR operation on the input image
var Result = Ocr.Read(Input);
// Retrieve the recognized text
var AllText = Result.Text;
// Optionally, you can output or process the `AllText` variable as needed
}' Import the IronOcr namespace
Imports IronOcr
' Create a new instance of the IronTesseract class, which is responsible for performing OCR
Private Ocr = New IronTesseract()
' Specify the language to be Yiddish
Ocr.Language = OcrLanguage.Yiddish
' Using block ensures that resources are disposed of correctly
Using Input = New OcrInput("images\Yiddish.png") ' Specify the path to your image file
' Perform the OCR operation on the input image
Dim Result = Ocr.Read(Input)
' Retrieve the recognized text
Dim AllText = Result.Text
' Optionally, you can output or process the `AllText` variable as needed
End Using$vbLabelText $csharpLabel





