Irish 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 Irish.
It is an advanced fork of Tesseract, built exclusively for .NET developers and regularly outperforms other Tesseract engines for both speed and accuracy.
Contents of IronOcr.Languages.Irish
This package contains 40 OCR languages for .NET:
- Irish
- IrishBest
- IrishFast
Download
Irish Language Pack [Gaeilge]
Installation
The first thing we have to do is install our Irish OCR package to your .NET project.
Install-Package IronOCR.Languages.Irish
Code Example
This C# code example reads Irish text from an Image or PDF document.
// Install the IronOCR Irish language package via NuGet:
// PM> Install-Package IronOCR.Languages.Irish
using IronOcr;
class IrishOcrExample
{
static void Main()
{
// Create a new instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Irish for OCR processing
Ocr.Language = OcrLanguage.Irish;
// Using the OCR input, specify the path to the image containing Irish text
using (var Input = new OcrInput(@"images\Irish.png"))
{
// Perform OCR to read the Irish text from the image
var Result = Ocr.Read(Input);
// Get the recognized text as a string from the OCR result
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
// Install the IronOCR Irish language package via NuGet:
// PM> Install-Package IronOCR.Languages.Irish
using IronOcr;
class IrishOcrExample
{
static void Main()
{
// Create a new instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Irish for OCR processing
Ocr.Language = OcrLanguage.Irish;
// Using the OCR input, specify the path to the image containing Irish text
using (var Input = new OcrInput(@"images\Irish.png"))
{
// Perform OCR to read the Irish text from the image
var Result = Ocr.Read(Input);
// Get the recognized text as a string from the OCR result
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
' Install the IronOCR Irish language package via NuGet:
' PM> Install-Package IronOCR.Languages.Irish
Imports IronOcr
Friend Class IrishOcrExample
Shared Sub Main()
' Create a new instance of the IronTesseract OCR engine
Dim Ocr = New IronTesseract()
' Set the language to Irish for OCR processing
Ocr.Language = OcrLanguage.Irish
' Using the OCR input, specify the path to the image containing Irish text
Using Input = New OcrInput("images\Irish.png")
' Perform OCR to read the Irish text from the image
Dim Result = Ocr.Read(Input)
' Get the recognized text as a string from the OCR result
Dim AllText = Result.Text
' Output the recognized text
Console.WriteLine(AllText)
End Using
End Sub
End Class
In this example, we utilize the IronTesseract class from the IronOCR library to perform OCR on an image containing text written in the Irish language. The OcrInput
object is used to load the image, and the Ocr.Read
method processes the image to extract text. The resulting text is then stored in the AllText
variable and printed to the console.