Turkish 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 Turkish.
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.Turkish
This package contains 46 OCR languages for .NET:
- Turkish
- TurkishBest
- TurkishFast
Download
Turkish Language Pack [Türkçe]
Installation
The first step is to install the Turkish OCR package in your .NET project using the following NuGet package manager command.
Install-Package IronOCR.Languages.Turkish
Code Example
This C# code example demonstrates how to read Turkish text from an image or PDF document.
// Import the IronOcr namespace
using IronOcr;
class OCRExample
{
static void Main()
{
// Create a new IronTesseract object
var Ocr = new IronTesseract();
// Set the OCR language to Turkish
Ocr.Language = OcrLanguage.Turkish;
// Define the input using a path to the image or PDF file
using (var Input = new OcrInput(@"images\Turkish.png"))
{
// Perform the OCR reading operation
var Result = Ocr.Read(Input);
// Retrieve the text from the OCR result
var AllText = Result.Text;
// Print the extracted text to the console
Console.WriteLine(AllText);
}
}
}
// Import the IronOcr namespace
using IronOcr;
class OCRExample
{
static void Main()
{
// Create a new IronTesseract object
var Ocr = new IronTesseract();
// Set the OCR language to Turkish
Ocr.Language = OcrLanguage.Turkish;
// Define the input using a path to the image or PDF file
using (var Input = new OcrInput(@"images\Turkish.png"))
{
// Perform the OCR reading operation
var Result = Ocr.Read(Input);
// Retrieve the text from the OCR result
var AllText = Result.Text;
// Print the extracted text to the console
Console.WriteLine(AllText);
}
}
}
' Import the IronOcr namespace
Imports IronOcr
Friend Class OCRExample
Shared Sub Main()
' Create a new IronTesseract object
Dim Ocr = New IronTesseract()
' Set the OCR language to Turkish
Ocr.Language = OcrLanguage.Turkish
' Define the input using a path to the image or PDF file
Using Input = New OcrInput("images\Turkish.png")
' Perform the OCR reading operation
Dim Result = Ocr.Read(Input)
' Retrieve the text from the OCR result
Dim AllText = Result.Text
' Print the extracted text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class
This code sets up an OCR process using IronOCR to read Turkish text from an input image. It then prints the extracted text to the console.