OCR de l'anglais moyen 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# permettant aux développeurs .NET de lire du texte à partir d'images et de documents PDF en 126 langues, y compris l'anglais moyen.

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

Ce package contient 64 langues OCR pour .NET :

  • Moyen anglais
  • Moyen anglaisBest
  • Moyen anglais rapide

Télécharger

Pack de langue en moyen anglais [Anglais (1100-1500 après J.-C.)]

  • Télécharger en tant que Zip
  • Installer avec NuGet

Installation

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

Install-Package IronOCR.Languages.MiddleEnglish

Exemple de code

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

// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Initialize the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the language to Middle English
        Ocr.Language = OcrLanguage.MiddleEnglish;

        // Define the input source as an image file
        using (var Input = new OcrInput(@"images\MiddleEnglish.png"))
        {
            // Perform OCR to read the text from the input
            var Result = Ocr.Read(Input);

            // Get all the recognized text
            var AllText = Result.Text;

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

class Program
{
    static void Main()
    {
        // Initialize the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the language to Middle English
        Ocr.Language = OcrLanguage.MiddleEnglish;

        // Define the input source as an image file
        using (var Input = new OcrInput(@"images\MiddleEnglish.png"))
        {
            // Perform OCR to read the text from the input
            var Result = Ocr.Read(Input);

            // Get all the recognized text
            var AllText = Result.Text;

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

Friend Class Program
	Shared Sub Main()
		' Initialize the IronTesseract OCR engine
		Dim Ocr = New IronTesseract()

		' Set the language to Middle English
		Ocr.Language = OcrLanguage.MiddleEnglish

		' Define the input source as an image file
		Using Input = New OcrInput("images\MiddleEnglish.png")
			' Perform OCR to read the text from the input
			Dim Result = Ocr.Read(Input)

			' Get all the recognized text
			Dim AllText = Result.Text

			' Output the recognized text
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel
  • Assurez-vous d'avoir installé le package IronOCR et le pack de langue approprié.
  • Cet exemple initialise le moteur OCR, le configure pour traiter le moyen anglais, lit le texte d'une image d'entrée et affiche le texte reconnu.