Yoruba OCR in C# and .NET
Other versions of this document:
IronOCR is a C# software component that allows .NET developers to read text from images and PDF documents in 126 languages, including Yoruba. 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.Yoruba
This package contains 43 OCR languages for .NET:
- Yoruba
- YorubaBest
- YorubaFast
Download
Yoruba Language Pack [Yorùbá]
Installation
The first task is to install the Yoruba OCR package to your .NET project.
PM> Install-Package IronOCR.Languages.Yoruba
PM> Install-Package IronOCR.Languages.Yoruba
Code Example
This C# code example reads Yoruba text from an image or PDF document.
// Remember to install the package first:
// PM> Install-Package IronOcr.Languages.Yoruba
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Yoruba
Ocr.Language = OcrLanguage.Yoruba;
// Specify the image or PDF file to read
using (var Input = new OcrInput(@"images\Yoruba.png"))
{
// Perform OCR on the input file
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine("Recognized Text: ");
Console.WriteLine(AllText);
}
}
}
// Remember to install the package first:
// PM> Install-Package IronOcr.Languages.Yoruba
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Yoruba
Ocr.Language = OcrLanguage.Yoruba;
// Specify the image or PDF file to read
using (var Input = new OcrInput(@"images\Yoruba.png"))
{
// Perform OCR on the input file
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine("Recognized Text: ");
Console.WriteLine(AllText);
}
}
}
Comments within the code explain each step, from setting the language to extracting and printing the recognized text. This example focuses on reading Yoruba text using IronOCR by specifying the Yoruba language and processing an image or PDF file.