Azerbaijani 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 w C#, umożliwiający programistom .NET odczyt tekstu z obrazów i dokumentów PDF w 126 językach, w tym po azerbejdżańsku.

Jest to zaawansowany fork Tesseracta, zbudowany wyłącznie dla deweloperów .NET i regularnie przewyższający inne silniki Tesseract pod względem szybkości i dokładności.

Zawartość IronOcr.Languages.Azerbaijani

Ten pakiet zawiera 138 języków OCR dla .NET:

  • Azerbejdżański
  • AzerbejdżańskiNajlepszy
  • AzerbejdżańskiSzybki
  • AzerbejdżańskiCyrylica
  • AzerbejdżańskiCyrylicaNajlepszy
  • AzerbejdżańskiCyrylicaSzybki

Pobieranie

Azerbaijani Language Pack [azərbaycan dili]

Instalacja

Pierwszą rzeczą, którą musimy zrobić, jest zainstalowanie naszego pakietu OCR Azerbejdżańskiego w projekcie .NET.

Install-Package IronOcr.Languages.Azerbaijani

Przyklad kodu

Ten przykład kodu C# odczytuje tekst azerbejdżański z obrazu lub dokumentu PDF.

// Ensure the IronOCR Azerbaijani language package is installed
// PM> Install-Package IronOcr.Languages.Azerbaijani

using IronOcr;

class Program
{
    static void Main()
    {
        // Create a new instance of IronTesseract engine
        var Ocr = new IronTesseract();

        // Specify the language to be Azerbaijani
        Ocr.Language = OcrLanguage.Azerbaijani;

        // Provide the path to the image file containing Azerbaijani text
        using (var Input = new OcrInput(@"images\Azerbaijani.png"))
        {
            // Process the image to extract text
            var Result = Ocr.Read(Input);

            // Extracted text is stored in Result.Text
            var AllText = Result.Text;

            // Output the extracted text
            Console.WriteLine(AllText);
        }
    }
}
// Ensure the IronOCR Azerbaijani language package is installed
// PM> Install-Package IronOcr.Languages.Azerbaijani

using IronOcr;

class Program
{
    static void Main()
    {
        // Create a new instance of IronTesseract engine
        var Ocr = new IronTesseract();

        // Specify the language to be Azerbaijani
        Ocr.Language = OcrLanguage.Azerbaijani;

        // Provide the path to the image file containing Azerbaijani text
        using (var Input = new OcrInput(@"images\Azerbaijani.png"))
        {
            // Process the image to extract text
            var Result = Ocr.Read(Input);

            // Extracted text is stored in Result.Text
            var AllText = Result.Text;

            // Output the extracted text
            Console.WriteLine(AllText);
        }
    }
}
Imports IronOcr

Module Program
    Sub Main()
        ' Create a new instance of IronTesseract engine
        Dim Ocr As New IronTesseract()

        ' Specify the language to be Azerbaijani
        Ocr.Language = OcrLanguage.Azerbaijani

        ' Provide the path to the image file containing Azerbaijani text
        Using Input As New OcrInput("images\Azerbaijani.png")
            ' Process the image to extract text
            Dim Result = Ocr.Read(Input)

            ' Extracted text is stored in Result.Text
            Dim AllText = Result.Text

            ' Output the extracted text
            Console.WriteLine(AllText)
        End Using
    End Sub
End Module
$vbLabelText   $csharpLabel

W tym przykładzie inicjujemy obiekt IronTesseract i ustawiamy jego język na azerbejdżański. Instancja OcrInput jest używana do odczytu obrazu z określonej ścieżki pliku. Metoda Ocr.Read przetwarza obraz w celu wyodrębnienia tekstu, który jest dostępny za pośrednictwem właściwości Result.Text. To pozwala na łatwe wyjście lub dalsze przetwarzanie.