Luxembourgish 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 Luxembourgish.
It is an advanced fork of Tesseract, built exclusively for the .NET developers and regularly outperforms other Tesseract engines for both speed and accuracy.
Contents of IronOcr.Languages.Luxembourgish
This package contains 64 OCR languages for .NET:
- Luxembourgish
- LuxembourgishBest
- LuxembourgishFast
Download
Luxembourgish Language Pack [Lëtzebuergesch]
Installation
The first thing we have to do is install the Luxembourgish OCR package into your .NET project.
Install-Package IronOCR.Languages.Luxembourgish
Code Example
This C# code example reads Luxembourgish text from an image or PDF document.
// Import the IronOcr namespace to utilize OCR functions
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of IronTesseract to perform OCR
var Ocr = new IronTesseract();
// Set the language for OCR to Luxembourgish
Ocr.Language = OcrLanguage.Luxembourgish;
// Load the input image or PDF from which to extract the text
using (var Input = new OcrInput(@"images\Luxembourgish.png"))
{
// Perform OCR on the input document
var Result = Ocr.Read(Input);
// Retrieve the recognized text from the result
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
// Import the IronOcr namespace to utilize OCR functions
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of IronTesseract to perform OCR
var Ocr = new IronTesseract();
// Set the language for OCR to Luxembourgish
Ocr.Language = OcrLanguage.Luxembourgish;
// Load the input image or PDF from which to extract the text
using (var Input = new OcrInput(@"images\Luxembourgish.png"))
{
// Perform OCR on the input document
var Result = Ocr.Read(Input);
// Retrieve the recognized text from the result
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
' Import the IronOcr namespace to utilize OCR functions
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create a new instance of IronTesseract to perform OCR
Dim Ocr = New IronTesseract()
' Set the language for OCR to Luxembourgish
Ocr.Language = OcrLanguage.Luxembourgish
' Load the input image or PDF from which to extract the text
Using Input = New OcrInput("images\Luxembourgish.png")
' Perform OCR on the input document
Dim Result = Ocr.Read(Input)
' Retrieve the recognized text from the result
Dim AllText = Result.Text
' Output the recognized text
Console.WriteLine(AllText)
End Using
End Sub
End Class
- This example demonstrates the use of IronOCR to recognize Luxembourgish text from local documents.
- The language is set to Luxembourgish to enhance recognition accuracy for texts in that language.
OcrInput()
is used to specify the input image or PDF file.Ocr.Read()
processes the document, and the recognized text is accessed viaResult.Text
.