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語言:
- NorthernKurdish
- NorthernKurdishBest
- NorthernKurdishFast
下載
北庫爾德語語言包 [Kurmanji]
安裝
我們首先要做的是將北庫爾德語的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

