Yoruba OCR in C# and .NET
Andere Versionen dieses Dokuments:
IronOCR ist eine C#-Softwarekomponente, die es .NET-Entwicklern ermöglicht, Text aus Bildern und PDF-Dokumenten in 126 Sprachen, einschließlich Yoruba, zu lesen. Es ist ein fortgeschrittener Fork von Tesseract, der ausschließlich for .NET-Entwickler entwickelt wurde und sowohl in der Geschwindigkeit als auch in der Genauigkeit regelmäßig andere Tesseract-Engines übertrifft.
Inhalte von IronOcr.Languages.Yoruba
Dieses Paket enthält 43 OCR-Sprachen for .NET:
- Yoruba
- YorubaBest
- YorubaFast
Download
Yoruba Sprachpaket [Yorùbá]
Installation
Die erste Aufgabe ist es, das Yoruba OCR-Paket in Ihrem .NET-Projekt zu installieren.
Install-Package IronOcr.Languages.Yoruba
Beispielcode
Dieses C#-Code-Beispiel liest Yoruba-Text aus einem Bild oder PDF-Dokument.
// 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
Kommentare im Code erklären jeden Schritt, vom Setzen der Sprache bis zum Extrahieren und Drucken des erkannten Textes. Dieses Beispiel konzentriert sich darauf, Yoruba-Text mit IronOCR zu lesen, indem die Yoruba-Sprache angegeben und eine Bild- oder PDF-Datei verarbeitet wird.

