Sanskrit OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English

126 Daha Fazla Dil

IronOCR, .NET kodlayıcılarının Sanskritçe dahil 126 dili içeren görüntülerden ve PDF belgelerinden metin okumalarına olanak tanıyan bir C# yazılım bileşenidir.

Tesseract'ın geliştirilmiş bir dalıdır, yalnızca .NET geliştiricileri için geliştirilmiştir ve hem hız hem de doğruluk bakımından diğer Tesseract motorlarını düzenli olarak geride bırakır.

IronOcr.Languages.Sanskrit içeriği

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

  • Sanskritçe
  • SanskritçeçeBest
  • SanskritçeçeFast

İndirme

Sanskritçe Dil Paketi [ससकतम]

Kurulum

İlk adım, .NET projenize Sanskritçe OCR paketini kurmaktır.

Install-Package IronOcr.Languages.Sanskrit

Kod Örneği

Bu C# kod örneği, bir Görüntüden veya PDF belgesinden Sanskritçe metin okur.

// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Create an instance of IronTesseract for OCR operations
        var Ocr = new IronTesseract
        {
            // Set the OCR language to Sanskrit
            Language = OcrLanguage.Sanskrit
        };

        // Define the input image or PDF file containing Sanskrit text
        using (var Input = new OcrInput(@"images\Sanskrit.png"))
        {
            // Perform OCR to read the text from the Input
            var Result = Ocr.Read(Input);

            // Capture the extracted text
            var AllText = Result.Text;

            // Print the extracted text to the console
            System.Console.WriteLine(AllText);
        }
    }
}
// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Create an instance of IronTesseract for OCR operations
        var Ocr = new IronTesseract
        {
            // Set the OCR language to Sanskrit
            Language = OcrLanguage.Sanskrit
        };

        // Define the input image or PDF file containing Sanskrit text
        using (var Input = new OcrInput(@"images\Sanskrit.png"))
        {
            // Perform OCR to read the text from the Input
            var Result = Ocr.Read(Input);

            // Capture the extracted text
            var AllText = Result.Text;

            // Print the extracted text to the console
            System.Console.WriteLine(AllText);
        }
    }
}
' Import the IronOcr namespace
Imports IronOcr

Friend Class Program
	Shared Sub Main()
		' Create an instance of IronTesseract for OCR operations
		Dim Ocr = New IronTesseract With {.Language = OcrLanguage.Sanskrit}

		' Define the input image or PDF file containing Sanskrit text
		Using Input = New OcrInput("images\Sanskrit.png")
			' Perform OCR to read the text from the Input
			Dim Result = Ocr.Read(Input)

			' Capture the extracted text
			Dim AllText = Result.Text

			' Print the extracted text to the console
			System.Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel
  • Bu örnek, IronTesseract'i bir Sanskritçe resim veya PDF üzerinde OCR gerçekleştirecek şekilde yapılandırmanın nasıl olduğunu gösterir.
  • Ocr.Read() yöntemi, girdiyi işler ve metin içeriğini Result.Text özelliği aracılığıyla erişilebilecek şekilde çıkarır.