Kyrgyz OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Other versions of this document:

IronOCR ist eine C#-Softwarekomponente, die es .NET-Programmierern ermöglicht, Text aus Bildern und PDF-Dokumenten in 126 Sprachen, einschließlich Kirgisisch, auszulesen.

Es ist eine erweiterte Abspaltung von Tesseract, die exklusiv für .NET-Entwickler entwickelt wurde und regelmäßig andere Tesseract-Engines sowohl in Bezug auf Geschwindigkeit als auch Genauigkeit übertrifft.

Inhalt von IronOcr.Languages.Kyrgyz

Dieses Paket enthält 43 OCR-Sprachen für .NET:

  • Kirgisisch
  • KyrgyzBest
  • KyrgyzFast

Download

Kirgisch Sprachpaket style='white-space:normal'>[Кыргызча]

Installation

Das erste, was wir tun müssen, ist, unser Kirgisch OCR-Paket in Ihrem .NET-Projekt zu installieren.

Install-Package IronOCR.Languages.Kyrgyz

Beispielcode

Dieses C#-Codebeispiel liest kirgisischen Text aus einem Bild oder PDF-Dokument.

// 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
  • Dieser Codeblock initialisiert ein IronTesseract-Objekt, um OCR durchzuführen.
  • Es stellt die Sprache auf Kirgisisch ein, indem es das OcrLanguage.Kyrgyz-Enum verwendet.
  • Die OcrInput-Klasse wird verwendet, um den Dateipfad des Bildes anzugeben, aus dem der Text extrahiert werden soll.
  • Ocr.Read(Input) führt den OCR-Prozess aus und stellt ein Ergebnis bereit, das den extrahierten Text enthält, auf den über Result.Text zugegriffen werden kann.
  • Schließlich, Console.WriteLine(AllText) gibt den extrahierten Text auf der Konsole aus.