Yoruba OCR in C# and .NET

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

IronOCR to komponent oprogramowania C#, który pozwala deweloperom .NET na odczytywanie tekstu z obrazów i dokumentów PDF w 126 językach, w tym w Yoruba. Jest to zaawansowany fork Tesseract, zbudowany wyłącznie dla deweloperów .NET, który regularnie przewyższa inne silniki Tesseract zarówno pod względem szybkości, jak i dokładności.

Zawartość IronOcr.Languages.Yoruba

Ten pakiet zawiera 43 języki OCR dla .NET:

  • Yoruba
  • YorubaBest
  • YorubaFast

Pobieranie

Yoruba Language Pack [Yorùbá]

Instalacja

Pierwszym zadaniem jest zainstalowanie pakietu OCR Yoruba do swojego projektu .NET.

Install-Package IronOcr.Languages.Yoruba

Przyklad kodu

Ten przykład kodu C# odczytuje tekst Yoruba z obrazu lub dokumentu 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
$vbLabelText   $csharpLabel

Komentarze w kodzie wyjaśniają każdy krok, od ustawienia języka po wyodrębnienie i wydrukowanie rozpoznanego tekstu. Ten przykład koncentruje się na odczytywaniu tekstu Yoruba za pomocą IronOCR poprzez określenie języka Yoruba i przetwarzanie pliku graficznego lub PDF.