Northern Kurdish OCR in C# and .NET
This article was translated from English: Does it need improvement?
Translated
View the article in English
IronOCR 是一个 C# 软件组件,允许 .NET 程序员从图像和 PDF 文档中读取 126 种语言的文本,包括北库尔德语。
它是 Tesseract 的一个高级分支,专为 .NET 开发人员构建,在速度和准确性方面通常优于其他 Tesseract 引擎。
IronOcr.Languages.NorthernKurdish 的内容
此软件包包含 70 种适用于 .NET 的 OCR 语言:
- 北库尔德语
- 北库尔德语Best
- 北库尔德快速
下载
北库尔德语语言包[库尔曼吉语]
安装
我们首先需要做的是将北库尔德语OCR 包安装到您的 .NET 项目中。
Install-Package IronOcr.Languages.NorthernKurdish
代码示例
这段 C# 代码示例从图像或 PDF 文档中读取北库尔德语文本。
// Ensure that the IronOCR package and the Northern Kurdish language package are installed
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to Northern Kurdish
Ocr.Language = OcrLanguage.NorthernKurdish;
// Use a using statement to ensure resources are disposed of correctly
// Specify the path to the image or PDF file you want to process
using (var Input = new OcrInput(@"images\NorthernKurdish.png"))
{
// Read the text from the input image or PDF
var Result = Ocr.Read(Input);
// Retrieve the recognized text
var AllText = Result.Text;
// AllText now contains the Northern Kurdish text extracted from the image
}
// Ensure that the IronOCR package and the Northern Kurdish language package are installed
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to Northern Kurdish
Ocr.Language = OcrLanguage.NorthernKurdish;
// Use a using statement to ensure resources are disposed of correctly
// Specify the path to the image or PDF file you want to process
using (var Input = new OcrInput(@"images\NorthernKurdish.png"))
{
// Read the text from the input image or PDF
var Result = Ocr.Read(Input);
// Retrieve the recognized text
var AllText = Result.Text;
// AllText now contains the Northern Kurdish text extracted from the image
}
' Ensure that the IronOCR package and the Northern Kurdish language package are installed
Imports IronOcr
Private Ocr = New IronTesseract()
' Set the OCR language to Northern Kurdish
Ocr.Language = OcrLanguage.NorthernKurdish
' Use a using statement to ensure resources are disposed of correctly
' Specify the path to the image or PDF file you want to process
Using Input = New OcrInput("images\NorthernKurdish.png")
' Read the text from the input image or PDF
Dim Result = Ocr.Read(Input)
' Retrieve the recognized text
Dim AllText = Result.Text
' AllText now contains the Northern Kurdish text extracted from the image
End Using
$vbLabelText
$csharpLabel

