Kyrgyz OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Bu belgenin diğer sürümleri:

IronOCR, .NET kodlayıcılarının Kırgızca dahil 126 dilde resimlerden ve PDF belgelerinden metin okumasına olanak tanıyan bir C# yazılım bileşenidir.

Bu, Tesseract'ın .NET geliştiricileri için özel olarak oluşturulmuş gelişmiş bir çatalıdır ve hem hız hem de doğruluk açısından diğer Tesseract motorlarından düzenli olarak daha iyi performans gösterir.

IronOcr.Languages.Kyrgyz içeriği

Bu paket, .NET için 43 OCR dili içerir:

  • Kırgızca
  • KırgızcaBest
  • KırgızcaFast

İndir

Kırgızca Dil Paketi [Кыргызча]

Kurulum

Yapmamız gereken ilk şey, Kırgızca OCR paketimizi .NET projenize yüklemektir.

Install-Package IronOcr.Languages.Kyrgyz

Kod Örneği

Bu C# kod örneği, bir görüntüden veya PDF belgesinden Kırgızca metni okur.

// 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
  • Bu kod bloğu, OCR işlemini gerçekleştirmek için bir IronTesseract nesnesini başlatır.
  • OcrLanguage.Kyrgyz enumunu kullanarak dili Kırgızca olarak ayarlar.
  • OcrInput sınıfı, metnin çıkarılacağı görüntünün dosya yolunu belirtmek için kullanılır.
  • Ocr.Read(Input), OCR işlemini gerçekleştirir ve Result.Text aracılığıyla erişilebilen, çıkarılan metni içeren bir sonuç sağlar.
  • Son olarak, Console.WriteLine(AllText), çıkarılan metni konsola gönderir.