Finnish 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 Finnish.
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.Finnish
This package contains 46 OCR languages for .NET:
- Finnish
- FinnishBest
- FinnishFast
Download
Finnish Language Pack [suomi]
Installation
The first thing we have to do is install our Finnish OCR package to your .NET project.
Install-Package IronOCR.Languages.Finnish
Code Example
This C# code example reads Finnish text from an Image or PDF document.
// Ensure you have installed the IronOcr.Languages.Finnish package before using this code.
// You can install it via NuGet package manager.
using IronOcr;
var Ocr = new IronTesseract(); // Create a new instance of the IronTesseract OCR engine
Ocr.Language = OcrLanguage.Finnish; // Set the language of the OCR engine to Finnish
// Using a using statement to ensure the OcrInput gets disposed of correctly
using (var Input = new OcrInput(@"images\Finnish.png")) // Path to the image/PDF containing Finnish text
{
var Result = Ocr.Read(Input); // Perform OCR on the input file
var AllText = Result.Text; // Extract the recognized text as a string
// Output or process the extracted text as required
Console.WriteLine(AllText); // Example of outputting the text to the console
}
// Ensure you have installed the IronOcr.Languages.Finnish package before using this code.
// You can install it via NuGet package manager.
using IronOcr;
var Ocr = new IronTesseract(); // Create a new instance of the IronTesseract OCR engine
Ocr.Language = OcrLanguage.Finnish; // Set the language of the OCR engine to Finnish
// Using a using statement to ensure the OcrInput gets disposed of correctly
using (var Input = new OcrInput(@"images\Finnish.png")) // Path to the image/PDF containing Finnish text
{
var Result = Ocr.Read(Input); // Perform OCR on the input file
var AllText = Result.Text; // Extract the recognized text as a string
// Output or process the extracted text as required
Console.WriteLine(AllText); // Example of outputting the text to the console
}
' Ensure you have installed the IronOcr.Languages.Finnish package before using this code.
' You can install it via NuGet package manager.
Imports IronOcr
Private Ocr = New IronTesseract() ' Create a new instance of the IronTesseract OCR engine
Ocr.Language = OcrLanguage.Finnish ' Set the language of the OCR engine to Finnish
' Using a using statement to ensure the OcrInput gets disposed of correctly
Using Input = New OcrInput("images\Finnish.png") ' Path to the image/PDF containing Finnish text
Dim Result = Ocr.Read(Input) ' Perform OCR on the input file
Dim AllText = Result.Text ' Extract the recognized text as a string
' Output or process the extracted text as required
Console.WriteLine(AllText) ' Example of outputting the text to the console
End Using