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

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

Ce package contient 46 langues OCR pour .NET :

  • Turc
  • TurkishBest
  • TurkishFast

Télécharger

Pack de langue turque [Turc]

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

Installation

La première étape consiste à installer le package OCR turc dans votre projet .NET à l'aide de la commande suivante du gestionnaire de packages NuGet.

Install-Package IronOCR.Languages.Turkish

Exemple de code

Cet exemple de code C# montre comment lire du texte turc à partir d'une image ou d'un document PDF.

// Import the IronOcr namespace
using IronOcr;

class OCRExample
{
    static void Main()
    {
        // Create a new IronTesseract object
        var Ocr = new IronTesseract();

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

        // Define the input using a path to the image or PDF file
        using (var Input = new OcrInput(@"images\Turkish.png"))
        {
            // Perform the OCR reading operation
            var Result = Ocr.Read(Input);

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

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

class OCRExample
{
    static void Main()
    {
        // Create a new IronTesseract object
        var Ocr = new IronTesseract();

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

        // Define the input using a path to the image or PDF file
        using (var Input = new OcrInput(@"images\Turkish.png"))
        {
            // Perform the OCR reading operation
            var Result = Ocr.Read(Input);

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

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

Friend Class OCRExample
	Shared Sub Main()
		' Create a new IronTesseract object
		Dim Ocr = New IronTesseract()

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

		' Define the input using a path to the image or PDF file
		Using Input = New OcrInput("images\Turkish.png")
			' Perform the OCR reading operation
			Dim Result = Ocr.Read(Input)

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

			' Print the extracted text to the console
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel

Ce code configure un processus OCR utilisant IronOCR pour lire du texte turc à partir d'une image d'entrée. Il affiche ensuite le texte extrait dans la console.