OCR du pachto 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 pachto. 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.Pachto

Ce package contient 43 langues OCR pour .NET :

  • Pachtoune
  • PachtouneBest
  • PachtouneFast

Télécharger

Pack de langue pachto [Pachto]

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

Installation

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

Install-Package IronOCR.Languages.Pashto

Exemple de code

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

// Import the IronOcr namespace
using IronOcr;

public class PashtoOcrExample
{
    public static void Main()
    {
        // Create an instance of the IronTesseract class
        var Ocr = new IronTesseract();

        // Set the OCR language to Pashto
        Ocr.Language = OcrLanguage.Pashto;

        // Specify the image file containing the Pashto text
        using (var Input = new OcrInput(@"images\Pashto.png"))
        {
            // Perform the OCR operation on the input image
            var Result = Ocr.Read(Input);

            // Store the extracted text from the image in a string variable
            var AllText = Result.Text;
        }
    }
}
// Import the IronOcr namespace
using IronOcr;

public class PashtoOcrExample
{
    public static void Main()
    {
        // Create an instance of the IronTesseract class
        var Ocr = new IronTesseract();

        // Set the OCR language to Pashto
        Ocr.Language = OcrLanguage.Pashto;

        // Specify the image file containing the Pashto text
        using (var Input = new OcrInput(@"images\Pashto.png"))
        {
            // Perform the OCR operation on the input image
            var Result = Ocr.Read(Input);

            // Store the extracted text from the image in a string variable
            var AllText = Result.Text;
        }
    }
}
' Import the IronOcr namespace
Imports IronOcr

Public Class PashtoOcrExample
	Public Shared Sub Main()
		' Create an instance of the IronTesseract class
		Dim Ocr = New IronTesseract()

		' Set the OCR language to Pashto
		Ocr.Language = OcrLanguage.Pashto

		' Specify the image file containing the Pashto text
		Using Input = New OcrInput("images\Pashto.png")
			' Perform the OCR operation on the input image
			Dim Result = Ocr.Read(Input)

			' Store the extracted text from the image in a string variable
			Dim AllText = Result.Text
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel
  • Cet extrait de code montre comment utiliser la bibliothèque IronOCR pour la reconnaissance de texte en pachto.
  • Il configure la classe IronTesseract , sélectionne le pachto comme langue et traite un fichier image ( Pashto.png ) pour extraire et afficher le texte.