Slovak 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 Slovak. 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.Slovak

This package contains 61 OCR languages for .NET:

  • Slovak
  • SlovakBest
  • SlovakFast
  • SlovakFraktur

Download

Slovak Language Pack [slovenčina]:

Installation

The first thing we have to do is install our Slovak OCR package into your .NET project.

Install-Package IronOCR.Languages.Slovak

Code Example

This C# code example reads Slovak text from an image or PDF document.

// Ensure you have installed the Slovak language pack for IronOCR
// PM> Install-Package IronOcr.Languages.Slovak

using IronOcr;

class SlovakOcrExample
{
    static void Main()
    {
        // Create an instance of IronTesseract for OCR processing
        var Ocr = new IronTesseract();

        // Set the language to Slovak
        Ocr.Language = OcrLanguage.Slovak;

        // Using an OcrInput to specify the source of the image or PDF
        using (var Input = new OcrInput(@"images\Slovak.png"))
        {
            // Perform OCR to read the text from the input image or PDF
            var Result = Ocr.Read(Input);

            // Extract all recognized text
            var AllText = Result.Text;

            // Output the extracted text to the console
            Console.WriteLine(AllText);
        }
    }
}
// Ensure you have installed the Slovak language pack for IronOCR
// PM> Install-Package IronOcr.Languages.Slovak

using IronOcr;

class SlovakOcrExample
{
    static void Main()
    {
        // Create an instance of IronTesseract for OCR processing
        var Ocr = new IronTesseract();

        // Set the language to Slovak
        Ocr.Language = OcrLanguage.Slovak;

        // Using an OcrInput to specify the source of the image or PDF
        using (var Input = new OcrInput(@"images\Slovak.png"))
        {
            // Perform OCR to read the text from the input image or PDF
            var Result = Ocr.Read(Input);

            // Extract all recognized text
            var AllText = Result.Text;

            // Output the extracted text to the console
            Console.WriteLine(AllText);
        }
    }
}
' Ensure you have installed the Slovak language pack for IronOCR
' PM> Install-Package IronOcr.Languages.Slovak

Imports IronOcr

Friend Class SlovakOcrExample
	Shared Sub Main()
		' Create an instance of IronTesseract for OCR processing
		Dim Ocr = New IronTesseract()

		' Set the language to Slovak
		Ocr.Language = OcrLanguage.Slovak

		' Using an OcrInput to specify the source of the image or PDF
		Using Input = New OcrInput("images\Slovak.png")
			' Perform OCR to read the text from the input image or PDF
			Dim Result = Ocr.Read(Input)

			' Extract all recognized text
			Dim AllText = Result.Text

			' Output the extracted text to the console
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel

This example demonstrates how to read Slovak text using the IronOCR library. It starts with creating an instance of IronTesseract, specifies Slovak as the language for OCR, and processes the input image located at images/Slovak.png. Finally, it extracts and outputs the text recognized from the image.