Yoruba OCR in C# and .NET
Autres versions de ce document :
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 yoruba. 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.Yoruba
Ce package contient 43 langues OCR pour .NET :
- Yoruba
- YorubaBest
- YorubaFast
Télécharger
Pack de langue yoruba [Yoruba]
Installation
La première étape consiste à installer le package OCR Yoruba sur votre projet .NET.
Install-Package IronOcr.Languages.Yoruba
Exemple de code
Cet exemple de code C# lit du texte yoruba à partir d'une image ou d'un document PDF.
// Remember to install the package first:
// PM> Install-Package IronOcr.Languages.Yoruba
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Yoruba
Ocr.Language = OcrLanguage.Yoruba;
// Specify the image or PDF file to read
using (var Input = new OcrInput(@"images\Yoruba.png"))
{
// Perform OCR on the input file
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine("Recognized Text: ");
Console.WriteLine(AllText);
}
}
}
// Remember to install the package first:
// PM> Install-Package IronOcr.Languages.Yoruba
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Yoruba
Ocr.Language = OcrLanguage.Yoruba;
// Specify the image or PDF file to read
using (var Input = new OcrInput(@"images\Yoruba.png"))
{
// Perform OCR on the input file
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine("Recognized Text: ");
Console.WriteLine(AllText);
}
}
}
' Remember to install the package first:
' PM> Install-Package IronOcr.Languages.Yoruba
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create a new instance of the IronTesseract OCR engine
Dim Ocr = New IronTesseract()
' Set the OCR language to Yoruba
Ocr.Language = OcrLanguage.Yoruba
' Specify the image or PDF file to read
Using Input = New OcrInput("images\Yoruba.png")
' Perform OCR on the input file
Dim Result = Ocr.Read(Input)
' Extract all recognized text
Dim AllText = Result.Text
' Output the recognized text
Console.WriteLine("Recognized Text: ")
Console.WriteLine(AllText)
End Using
End Sub
End Class
Les commentaires intégrés au code expliquent chaque étape, depuis la définition de la langue jusqu'à l'extraction et l'impression du texte reconnu. Cet exemple se concentre sur la lecture de texte yoruba à l'aide d'IronOCR en spécifiant la langue yoruba et en traitant un fichier image ou PDF.

