Galician 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 versiyonları:

IronOCR, .NET geliştiricilerinin, Galce de dahil olmak üzere 126 dildeki görüntü ve PDF belgelerinden metin çıkarmasına olanak tanıyan bir C# yazılım bileşenidir.

Tesseract'ın ileri düzey bir çatalıdır, özel olarak .NET geliştiricilerine yönelik tasarlanmış ve hem hız hem de doğruluk açısından diğer Tesseract motorlarının önünde yer almaktadır.

IronOcr.Languages.Galician İçeriği

Bu paket, .NET için 49 OCR dili içerir, bunlar arasında:

  • Galce
  • GalicianBest
  • GalicianFast

İndirme

Galce Dil Paketi [galego]

Kurulum

Galce OCR paketini .NET projenizde kullanmanın ilk adımı, onu yüklemektir.

Install-Package IronOcr.Languages.Galician

Kod Örneği

Aşağıdaki C# kod örneği, bir görüntü veya PDF belgesinden Galce metin okuma işlemini göstermektedir.

// Include the IronOcr library
using IronOcr;

class Program
{
    static void Main()
    {
        // Instantiate the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Specify the language for OCR as Galician
        Ocr.Language = OcrLanguage.Galician;

        // Define the input source, here it is an image file
        using (var Input = new OcrInput(@"images\Galician.png"))
        {
            // Perform the OCR process on the input image
            var Result = Ocr.Read(Input);

            // Retrieve the recognized text from the OCR result
            var AllText = Result.Text;

            // Output the extracted text to the console
            Console.WriteLine(AllText);
        }
    }
}
// Include the IronOcr library
using IronOcr;

class Program
{
    static void Main()
    {
        // Instantiate the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Specify the language for OCR as Galician
        Ocr.Language = OcrLanguage.Galician;

        // Define the input source, here it is an image file
        using (var Input = new OcrInput(@"images\Galician.png"))
        {
            // Perform the OCR process on the input image
            var Result = Ocr.Read(Input);

            // Retrieve the recognized text from the OCR result
            var AllText = Result.Text;

            // Output the extracted text to the console
            Console.WriteLine(AllText);
        }
    }
}
' Include the IronOcr library
Imports IronOcr

Friend Class Program
	Shared Sub Main()
		' Instantiate the IronTesseract OCR engine
		Dim Ocr = New IronTesseract()

		' Specify the language for OCR as Galician
		Ocr.Language = OcrLanguage.Galician

		' Define the input source, here it is an image file
		Using Input = New OcrInput("images\Galician.png")
			' Perform the OCR process on the input image
			Dim Result = Ocr.Read(Input)

			' Retrieve the recognized text from the OCR result
			Dim AllText = Result.Text

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

Yukarıdaki kodda:

  • IronTesseract sınıfını kullanarak bir OCR motoru nesnesi oluşturuyoruz.
  • OCR dilini Galce olarak ayarlıyoruz, bu da OCR motorunun Galce metni doğru bir şekilde işlemesini sağlıyor.
  • Daha sonra "images\Galician.png" konumundaki görüntü dosyasını okuyoruz ve tanınan metni alıyoruz.
  • Son olarak, tanınan metni konsola yazdırıyoruz.