Slovak OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Inne wersje tego dokumentu:

IronOCR to komponent oprogramowania C# pozwalający programistom .NET odczytywać tekst z obrazów i dokumentów PDF w 126 językach, w tym po słowacku. Jest to zaawansowany fork Tesseracta, zbudowany wyłącznie dla deweloperów .NET i regularnie przewyższający inne silniki Tesseract pod względem szybkości i dokładności.

Zawartość IronOcr.Languages.Slovak

Ten pakiet zawiera 61 języków OCR dla .NET:

  • Słowacki
  • SłowackiBest
  • SłowackiFast
  • SlowackiFraktur

Pobieranie

Pakiet języka słowackiego [slovenčina]:

Instalacja

Pierwszą rzeczą, którą musimy zrobić, jest zainstalowanie naszego pakietu OCR Slowacki do Twojego projektu .NET.

Install-Package IronOcr.Languages.Slovak

Przyklad kodu

Ten przykład kodu C# odczytuje tekst słowacki z obrazu lub dokumentu PDF.

// 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

Ten przykład pokazuje, jak odczytać tekst słowacki przy użyciu biblioteki IronOCR. Zaczyna się od utworzenia instancji IronTesseract, określa słowacki jako język dla OCR i przetwarza obraz wejściowy znajdujący się w images/Slovak.png. Na koniec wydobywa i wyjmuje tekst rozpoznany z obrazu.