OCR sanskrit en C# et .NET

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

126 autres langues

IronOCR est un composant logiciel C# qui permet aux développeurs .NET de lire du texte à partir d'images et de documents PDF dans 126 langues, dont le sanskrit.

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

Ce package contient 49 langues OCR pour .NET :

  • Sanskrit
  • SanskritBest
  • SanskritFast

Télécharger

Pack de langue sanskrite [ससकतम]

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

Installation

La première étape consiste à installer le package OCR sanskrit dans votre projet .NET.

Install-Package IronOCR.Languages.Sanskrit

Exemple de code

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

// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Create an instance of IronTesseract for OCR operations
        var Ocr = new IronTesseract
        {
            // Set the OCR language to Sanskrit
            Language = OcrLanguage.Sanskrit
        };

        // Define the input image or PDF file containing Sanskrit text
        using (var Input = new OcrInput(@"images\Sanskrit.png"))
        {
            // Perform OCR to read the text from the Input
            var Result = Ocr.Read(Input);

            // Capture the extracted text
            var AllText = Result.Text;

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

class Program
{
    static void Main()
    {
        // Create an instance of IronTesseract for OCR operations
        var Ocr = new IronTesseract
        {
            // Set the OCR language to Sanskrit
            Language = OcrLanguage.Sanskrit
        };

        // Define the input image or PDF file containing Sanskrit text
        using (var Input = new OcrInput(@"images\Sanskrit.png"))
        {
            // Perform OCR to read the text from the Input
            var Result = Ocr.Read(Input);

            // Capture the extracted text
            var AllText = Result.Text;

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

Friend Class Program
	Shared Sub Main()
		' Create an instance of IronTesseract for OCR operations
		Dim Ocr = New IronTesseract With {.Language = OcrLanguage.Sanskrit}

		' Define the input image or PDF file containing Sanskrit text
		Using Input = New OcrInput("images\Sanskrit.png")
			' Perform OCR to read the text from the Input
			Dim Result = Ocr.Read(Input)

			' Capture the extracted text
			Dim AllText = Result.Text

			' Print the extracted text to the console
			System.Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel
  • Cet exemple montre comment configurer IronTesseract pour effectuer une reconnaissance optique de caractères (OCR) sur une image ou un PDF en sanskrit.
  • La méthode Ocr.Read() traite l'entrée et extrait le contenu textuel, accessible via la propriété Result.Text .