Irish 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 programcılarının İrlanda Dili dahil olmak üzere 126 dildeki resimlerden ve PDF belgelerinden metin okumasını sağlayan bir C# yazılım bileşenidir.

Tesseract'ın ileri düzey bir çatallamasıdır, yalnızca .NET geliştiricileri için oluşturulmuş olup hız ve doğruluk açısından diğer Tesseract motorlarını düzenli olarak geride bırakmaktadır.

IronOcr.Languages.Irish İçeriği

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

  • İrlanda Dili
  • IrishBest
  • IrishFast

İndirme

İrlanda Dili Dil Paketi [Gaeilge]

Kurulum

İlk yapmamız gereken şey İrlanda Dili OCR paketimizi .NET projenize yüklemektir.

Install-Package IronOcr.Languages.Irish

Kod Örneği

Bu C# kod örneği, bir resim veya PDF belgesinden İrlanda Dili metin okur.

// Install the IronOCR Irish language package via NuGet:
// PM> Install-Package IronOcr.Languages.Irish

using IronOcr;

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

        // Set the language to Irish for OCR processing
        Ocr.Language = OcrLanguage.Irish;

        // Using the OCR input, specify the path to the image containing Irish text
        using (var Input = new OcrInput(@"images\Irish.png"))
        {
            // Perform OCR to read the Irish text from the image
            var Result = Ocr.Read(Input);

            // Get the recognized text as a string from the OCR result
            var AllText = Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
// Install the IronOCR Irish language package via NuGet:
// PM> Install-Package IronOcr.Languages.Irish

using IronOcr;

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

        // Set the language to Irish for OCR processing
        Ocr.Language = OcrLanguage.Irish;

        // Using the OCR input, specify the path to the image containing Irish text
        using (var Input = new OcrInput(@"images\Irish.png"))
        {
            // Perform OCR to read the Irish text from the image
            var Result = Ocr.Read(Input);

            // Get the recognized text as a string from the OCR result
            var AllText = Result.Text;

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

Module IrishOcrExample

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

        ' Set the language to Irish for OCR processing
        Ocr.Language = OcrLanguage.Irish

        ' Using the OCR input, specify the path to the image containing Irish text
        Using Input As New OcrInput("images\Irish.png")
            ' Perform OCR to read the Irish text from the image
            Dim Result = Ocr.Read(Input)

            ' Get the recognized text as a string from the OCR result
            Dim AllText As String = Result.Text

            ' Output the recognized text
            Console.WriteLine(AllText)
        End Using
    End Sub

End Module
$vbLabelText   $csharpLabel

Bu örnekte, IronOCR kütüphanesinden IronTesseract sınıfını kullanarak İrlanda Dili ile yazılmış bir metin içeren bir resim üzerinde OCR işlemi gerçekleştiriyoruz. OcrInput nesnesi, resmi yüklemek için kullanılır ve Ocr.Read yöntemi, metni çıkarmak için resmi işler. Elde edilen metin, daha sonra AllText değişkenine depolanır ve konsola yazdırılır.