Kazakh OCR in C# and .NET
Other versions of this document:
IronOCR is a C# software component allowing .NET coders to read text from images and PDF documents in 126 languages, including Kazakh.
It is an advanced fork of Tesseract, built exclusively for .NET developers and regularly outperforms other Tesseract engines in both speed and accuracy.
Contents of IronOcr.Languages.Kazakh
This package contains 43 OCR languages for .NET:
- Kazakh
- KazakhBest
- KazakhFast
Download
Kazakh Language Pack [қазақ тілі]
Installation
The first thing we have to do is install our Kazakh OCR package to your .NET project.
Install-Package IronOCR.Languages.Kazakh
Code Example
This C# code example reads Kazakh text from an Image or PDF document.
// 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
This code demonstrates how to perform Optical Character Recognition (OCR) on an image file named Kazakh.png
using IronOCR configured for the Kazakh language. The recognized text is extracted and printed to the console.