Basque 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 Basque.
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.Basque
This package contains 43 OCR languages for .NET:
- Basque
- BasqueBest
- BasqueFast
Download
Basque Language Pack [euskara]
Installation
The first thing we have to do is install our Basque OCR package to your .NET project.
Install-Package IronOCR.Languages.Basque
Code Example
This C# code example reads Basque text from an image or PDF document.
// Import the IronOcr namespace
using IronOcr;
class BasqueOCRExample
{
static void Main()
{
// Create a new instance of IronTesseract
var Ocr = new IronTesseract();
// Set the language to Basque
Ocr.Language = OcrLanguage.Basque;
// Read the text from a Basque image or PDF
using (var Input = new OcrInput(@"images\Basque.png"))
{
// Perform OCR to get the result
var Result = Ocr.Read(Input);
// Extract all text from the OCR result
var AllText = Result.Text;
// Output the extracted text
System.Console.WriteLine(AllText);
}
}
}
// Import the IronOcr namespace
using IronOcr;
class BasqueOCRExample
{
static void Main()
{
// Create a new instance of IronTesseract
var Ocr = new IronTesseract();
// Set the language to Basque
Ocr.Language = OcrLanguage.Basque;
// Read the text from a Basque image or PDF
using (var Input = new OcrInput(@"images\Basque.png"))
{
// Perform OCR to get the result
var Result = Ocr.Read(Input);
// Extract all text from the OCR result
var AllText = Result.Text;
// Output the extracted text
System.Console.WriteLine(AllText);
}
}
}
' Import the IronOcr namespace
Imports IronOcr
Friend Class BasqueOCRExample
Shared Sub Main()
' Create a new instance of IronTesseract
Dim Ocr = New IronTesseract()
' Set the language to Basque
Ocr.Language = OcrLanguage.Basque
' Read the text from a Basque image or PDF
Using Input = New OcrInput("images\Basque.png")
' Perform OCR to get the result
Dim Result = Ocr.Read(Input)
' Extract all text from the OCR result
Dim AllText = Result.Text
' Output the extracted text
System.Console.WriteLine(AllText)
End Using
End Sub
End Class
This code sets up an OCR engine using IronOCR specifically for the Basque language. It loads an image (or path to PDF) to perform OCR and extract all textual content, which is then printed out to the console.