OCR basque 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 basque.

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

Ce package contient 43 langues OCR pour .NET :

  • Basque
  • BasqueBest
  • BasqueFast

Télécharger

Pack de langue basque [Basque]

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

Installation

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

Install-Package IronOCR.Languages.Basque

Exemple de code

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

// Import the IronOcr namespace
using IronOcr;

class BasqueOCRExample
{
    static void Main()
    {
        // Create a new instance of IronTesseract
        var Ocr = new IronTesseract();

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

        // Read the text from a Basque image or PDF
        using (var Input = new OcrInput(@"images\Basque.png"))
        {
            // Perform OCR to get the result
            var Result = Ocr.Read(Input);

            // Extract all text from the OCR result
            var AllText = Result.Text;

            // Output the extracted text
            System.Console.WriteLine(AllText);
        }
    }
}
// Import the IronOcr namespace
using IronOcr;

class BasqueOCRExample
{
    static void Main()
    {
        // Create a new instance of IronTesseract
        var Ocr = new IronTesseract();

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

        // Read the text from a Basque image or PDF
        using (var Input = new OcrInput(@"images\Basque.png"))
        {
            // Perform OCR to get the result
            var Result = Ocr.Read(Input);

            // Extract all text from the OCR result
            var AllText = Result.Text;

            // Output the extracted text
            System.Console.WriteLine(AllText);
        }
    }
}
' Import the IronOcr namespace
Imports IronOcr

Friend Class BasqueOCRExample
	Shared Sub Main()
		' Create a new instance of IronTesseract
		Dim Ocr = New IronTesseract()

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

		' Read the text from a Basque image or PDF
		Using Input = New OcrInput("images\Basque.png")
			' Perform OCR to get the result
			Dim Result = Ocr.Read(Input)

			' Extract all text from the OCR result
			Dim AllText = Result.Text

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

Ce code configure un moteur OCR utilisant IronOCR spécifiquement pour la langue basque. Il charge une image (ou un chemin vers un PDF) pour effectuer une reconnaissance optique de caractères (OCR) et extraire tout le contenu textuel, qui est ensuite imprimé sur la console.