Sanskrit OCR in C# and .NET
IronOCR ist eine C# Softwarekomponente, die es .NET-Entwicklern ermöglicht, Text aus Bildern und PDF-Dokumenten in 126 Sprachen, einschließlich Sanskrit, zu lesen.
Es ist eine fortschrittliche Abspaltung von Tesseract, die ausschließlich for .NET-Entwickler gebaut wurde und regelmäßig andere Tesseract-Engines sowohl in Geschwindigkeit als auch Genauigkeit übertrifft.
Inhalt von IronOcr.Languages.Sanskrit
Dieses Paket enthält 49 OCR-Sprachen for .NET:
- Sanskrit
- SanskritBest
- SanskritFast
Download
Sanskrit Sprachpaket [ससकतम]
Installation
Der erste Schritt ist, das Sanskrit OCR-Paket in Ihr .NET-Projekt zu installieren.
Install-Package IronOcr.Languages.Sanskrit
Beispielcode
Dieses C#-Codebeispiel liest Sanskrit-Text aus einem Bild oder PDF-Dokument.
// 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
- Dieses Beispiel zeigt, wie IronTesseract konfiguriert wird, um OCR auf einem Sanskrit-Bild oder PDF auszuführen.
Die Methode
Ocr.Read()verarbeitet die Eingabe und extrahiert den Textinhalt, der über die EigenschaftResult.Textzugänglich ist.

