Scottish Gaelic OCR in C# and .NET
IronOCR is a C# software component allowing .NET coders to read text from images and PDF documents in 126 languages, including Scottish Gaelic.
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.ScottishGaelic
This package contains 67 OCR languages for .NET:
- ScottishGaelic
- ScottishGaelicBest
- ScottishGaelicFast
Download
Scottish Gaelic Language Pack [Gàidhlig]
Installation
The first thing we have to do is install our Scottish Gaelic OCR package to your .NET project.
Install-Package IronOCR.Languages.ScottishGaelic
Code Example
This C# code example reads Scottish Gaelic text from an image or PDF document.
// PM> Install-Package IronOcr.Languages.ScottishGaelic
using IronOcr;
// Create an instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the language to Scottish Gaelic
Ocr.Language = OcrLanguage.ScottishGaelic;
// Create an OcrInput object with the specified image or PDF file
using (var Input = new OcrInput(@"images\ScottishGaelic.png"))
{
// Perform OCR on the input and obtain the result
var Result = Ocr.Read(Input);
// Retrieve the recognized text
var AllText = Result.Text;
}
// PM> Install-Package IronOcr.Languages.ScottishGaelic
using IronOcr;
// Create an instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the language to Scottish Gaelic
Ocr.Language = OcrLanguage.ScottishGaelic;
// Create an OcrInput object with the specified image or PDF file
using (var Input = new OcrInput(@"images\ScottishGaelic.png"))
{
// Perform OCR on the input and obtain the result
var Result = Ocr.Read(Input);
// Retrieve the recognized text
var AllText = Result.Text;
}
' PM> Install-Package IronOcr.Languages.ScottishGaelic
Imports IronOcr
' Create an instance of the IronTesseract class
Private Ocr = New IronTesseract()
' Set the language to Scottish Gaelic
Ocr.Language = OcrLanguage.ScottishGaelic
' Create an OcrInput object with the specified image or PDF file
Using Input = New OcrInput("images\ScottishGaelic.png")
' Perform OCR on the input and obtain the result
Dim Result = Ocr.Read(Input)
' Retrieve the recognized text
Dim AllText = Result.Text
End Using
The above code installs and sets up an OCR process using IronOcr for the Scottish Gaelic language. It performs optical character recognition on the specified image ScottishGaelic.png
and extracts the text contained in the image. The extracted text will be stored in the AllText
variable for further use or processing.