Sanskrit OCR in C# and .NET
IronOCR, .NET kodlayıcıların Sanskritçe de dahil olmak üzere 126 dildeki görüntülerden ve PDF belgelerinden metin okumalarını sağlayan bir C# yazılım bileşenidir.
Tesseract'ın, yalnızca .NET geliştiricileri için özel olarak oluşturulmuş gelişmiş bir dalıdır ve hız ve doğruluk açısından diğer Tesseract motorlarını düzenli olarak geride bırakır.
IronOcr.Languages.Sanskrit İçeriği
Bu paket, .NET için 49 OCR dilini içerir:
- Sanskritçe
- SanskritçeBest
- SanskritçeFast
İndir
Sanskrit Dil Paketi [ससकतम]
Kurulum
İlk adım, Sanskrit OCR paketini .NET projenize yüklemektir.
Install-Package IronOcr.Languages.Sanskrit
Kod Örneği
Bu C# kod örneği, bir Görüntü veya PDF belgesinden Sanskrit metni 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
- Bu örnek, IronTesseract'ı Sanskrit bir görüntü veya PDF'de OCR yapmak için nasıl yapılandırılacağını göstermektedir.
Ocr.Read()yöntemi, girişi işler veResult.Textözelliği aracılığıyla erişilebilen metin içeriğini çıkarır.

