Kazakh 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.Kazakh的內容
此套件包含43種適用於.NET的OCR語言:
- 哈薩克語
- 哈薩克語Best
- 哈薩克語Fast
下載
哈薩克語語言包 [қазақ тілі]
安裝
我們首先需要在您的.NET項目中安裝我們的哈薩克語OCR套件。
Install-Package IronOcr.Languages.Kazakh
程式碼範例
此C#程式碼範例從圖片或PDF文件中讀取哈薩克語文字。
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract OCR class
var Ocr = new IronTesseract();
// Set the OCR language to Kazakh
Ocr.Language = OcrLanguage.Kazakh;
// Use a 'using' statement to manage resources efficiently
using (var Input = new OcrInput(@"images\Kazakh.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Retrieve and store the recognized text
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract OCR class
var Ocr = new IronTesseract();
// Set the OCR language to Kazakh
Ocr.Language = OcrLanguage.Kazakh;
// Use a 'using' statement to manage resources efficiently
using (var Input = new OcrInput(@"images\Kazakh.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Retrieve and store the recognized text
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
' Import the IronOcr namespace
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Initialize the IronTesseract OCR class
Dim Ocr = New IronTesseract()
' Set the OCR language to Kazakh
Ocr.Language = OcrLanguage.Kazakh
' Use a 'using' statement to manage resources efficiently
Using Input = New OcrInput("images\Kazakh.png")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Retrieve and store the recognized text
Dim AllText = Result.Text
' Output the recognized text
Console.WriteLine(AllText)
End Using
End Sub
End Class
$vbLabelText
$csharpLabel
此程式碼示範如何使用配置為哈薩克語的IronOCR對名為Kazakh.png的圖像文件進行光學字元識別 (OCR)。 識別出的文字將被提取並列印到控制台。

