OCR slovaque en C# et .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Other versions of this document:

IronOCR est un composant logiciel C# permettant aux développeurs .NET de lire du texte à partir d'images et de documents PDF dans 126 langues, dont le slovaque. Il s'agit d'une version avancée de Tesseract, conçue exclusivement pour les développeurs .NET et qui surpasse régulièrement les autres moteurs Tesseract en termes de vitesse et de précision.

Contenu de IronOcr.Languages.Slovaque

Ce package contient 61 langues OCR pour .NET :

  • Slovaque
  • SlovakBest
  • SlovakFast
  • Fracturation slovaque

Télécharger

Pack de langue slovaque [slovaque] :

  • Télécharger au format ZIP
  • Installer avec NuGet

Installation

La première chose à faire est d'installer notre package OCR slovaque dans votre projet .NET.

Install-Package IronOCR.Languages.Slovak

Exemple de code

Cet exemple de code C# lit du texte slovaque à partir d'une image ou d'un document 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

Cet exemple montre comment lire un texte slovaque à l'aide de la bibliothèque IronOCR. Cela commence par la création d'une instance d' IronTesseract , spécifie le slovaque comme langue pour la reconnaissance optique de caractères (OCR) et traite l'image d'entrée située dans images/Slovak.png . Enfin, il extrait et affiche le texte reconnu à partir de l'image.