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 程式設計師能夠從 126 種語言(包括北庫德語)的圖片和 PDF 文件中讀取文字。
這是 Tesseract 的進階分支版本,專為 .NET 開發人員打造,無論在速度或準確度方面,其表現均經常優於其他 Tesseract 引擎。
IronOcr.Languages.NorthernKurdish 的內容
此套件包含 70 種適用於 .NET 的 OCR 語言:
- 北庫德語
- 北庫德語Best
- 北庫德語Fast
下載
北庫德語語言套件 [庫爾曼吉]
安裝
我們首先必須將北庫德語 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

