OCR irlandais 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 l'irlandais.

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 d'IronOcr.Langues.Irlandais

Ce package contient 40 langues OCR pour .NET :

  • Irlandais
  • IrishBest
  • IrishFast

Télécharger

Pack de langue irlandaise [irlandais]

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

Installation

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

Install-Package IronOCR.Languages.Irish

Exemple de code

Cet exemple de code C# lit du texte irlandais à partir d'une image ou d'un document PDF.

// Install the IronOCR Irish language package via NuGet:
// PM> Install-Package IronOCR.Languages.Irish

using IronOcr;

class IrishOcrExample
{
    static void Main()
    {
        // Create a new instance of the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the language to Irish for OCR processing
        Ocr.Language = OcrLanguage.Irish;

        // Using the OCR input, specify the path to the image containing Irish text
        using (var Input = new OcrInput(@"images\Irish.png"))
        {
            // Perform OCR to read the Irish text from the image
            var Result = Ocr.Read(Input);

            // Get the recognized text as a string from the OCR result
            var AllText = Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
// Install the IronOCR Irish language package via NuGet:
// PM> Install-Package IronOCR.Languages.Irish

using IronOcr;

class IrishOcrExample
{
    static void Main()
    {
        // Create a new instance of the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the language to Irish for OCR processing
        Ocr.Language = OcrLanguage.Irish;

        // Using the OCR input, specify the path to the image containing Irish text
        using (var Input = new OcrInput(@"images\Irish.png"))
        {
            // Perform OCR to read the Irish text from the image
            var Result = Ocr.Read(Input);

            // Get the recognized text as a string from the OCR result
            var AllText = Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
' Install the IronOCR Irish language package via NuGet:
' PM> Install-Package IronOCR.Languages.Irish

Imports IronOcr

Friend Class IrishOcrExample
	Shared Sub Main()
		' Create a new instance of the IronTesseract OCR engine
		Dim Ocr = New IronTesseract()

		' Set the language to Irish for OCR processing
		Ocr.Language = OcrLanguage.Irish

		' Using the OCR input, specify the path to the image containing Irish text
		Using Input = New OcrInput("images\Irish.png")
			' Perform OCR to read the Irish text from the image
			Dim Result = Ocr.Read(Input)

			' Get the recognized text as a string from the OCR result
			Dim AllText = Result.Text

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

Dans cet exemple, nous utilisons la classe IronTesseract de la bibliothèque IronOCR pour effectuer une reconnaissance optique de caractères (OCR) sur une image contenant du texte écrit en irlandais. L'objet OcrInput est utilisé pour charger l'image, et la méthode Ocr.Read traite l'image pour en extraire le texte. Le texte résultant est ensuite stocké dans la variable AllText et affiché dans la console.