Kyrgyz 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 jest komponentem oprogramowania C#, który pozwala programistom .NET odczytywac tekst z obrazow i dokumentow PDF w 126 językach, w tym kirgiskim.

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.

Zawartosc IronOcr.Languages.Kyrgyz

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

  • Kirgiski
  • KirgiskiBest
  • KirgiskiFast

Pobieranie

Kyrgyz Language Pack [Кыргызча]

Instalacja

Pierwsza rzecz, która musimy zrobic, to zainstalować nasz pakiet OCR Kirgiska do projektu .NET.

Install-Package IronOcr.Languages.Kyrgyz

Przyklad kodu

Ten przyklad kodu C# odczytuje kirgiski tekst z obrazu lub dokumentu PDF.

// Import the IronOcr namespace
using IronOcr;

public class KyrgyzOcrExample
{
    public void PerformOcr()
    {
        // Initialize IronTesseract for OCR operations
        var Ocr = new IronTesseract();

        // Set the OCR language to Kyrgyz
        Ocr.Language = OcrLanguage.Kyrgyz;

        // Define the input using an image file path
        using (var Input = new OcrInput(@"images\Kyrgyz.png"))
        {
            // Perform OCR and get the result
            var Result = Ocr.Read(Input);

            // Extracted text from the image
            string AllText = Result.Text;

            // Output the extracted text (or use it in your application as needed)
            Console.WriteLine(AllText);
        }
    }
}
// Import the IronOcr namespace
using IronOcr;

public class KyrgyzOcrExample
{
    public void PerformOcr()
    {
        // Initialize IronTesseract for OCR operations
        var Ocr = new IronTesseract();

        // Set the OCR language to Kyrgyz
        Ocr.Language = OcrLanguage.Kyrgyz;

        // Define the input using an image file path
        using (var Input = new OcrInput(@"images\Kyrgyz.png"))
        {
            // Perform OCR and get the result
            var Result = Ocr.Read(Input);

            // Extracted text from the image
            string AllText = Result.Text;

            // Output the extracted text (or use it in your application as needed)
            Console.WriteLine(AllText);
        }
    }
}
' Import the IronOcr namespace
Imports IronOcr

Public Class KyrgyzOcrExample
	Public Sub PerformOcr()
		' Initialize IronTesseract for OCR operations
		Dim Ocr = New IronTesseract()

		' Set the OCR language to Kyrgyz
		Ocr.Language = OcrLanguage.Kyrgyz

		' Define the input using an image file path
		Using Input = New OcrInput("images\Kyrgyz.png")
			' Perform OCR and get the result
			Dim Result = Ocr.Read(Input)

			' Extracted text from the image
			Dim AllText As String = Result.Text

			' Output the extracted text (or use it in your application as needed)
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel
  • Ten blok kodu inicjuje obiekt IronTesseract w celu wykonania OCR.
  • Ustawia język na kirgiski przy użyciu wyliczenia OcrLanguage.Kyrgyz.
  • Klasa OcrInput służy do określenia ścieżki pliku obrazu, z którego zostanie wyodrębniony tekst.
  • Ocr.Read(Input) wykonuje proces OCR i dostarcza wynik zawierający wyodrębniony tekst, dostępny za pośrednictwem Result.Text.
  • Na koniec Console.WriteLine(AllText) wyświetla wyodrębniony tekst na konsoli.