Marathi OCR in C# and .NET
Bu belgenin diğer versiyonları:
IronOCR, .NET yazılımcılarının 126 dilde, Marathi de dahil olmak üzere, görüntüler ve PDF belgelerinden metin okumasına izin veren bir C# yazılım bileşenidir.
Sadece .NET geliştiricileri için inşa edilen Tesseract'ın gelişmiş bir dalı olup, hem hız hem de doğruluk açısından diğer Tesseract motorlarını sık sık geride bırakır.
IronOcr.Languages.Marathi İçeriği
Bu paket, .NET için 46 OCR dili içerir:
- Marathi
- MarathiBest
- MarathiFast
İndirme
Marathi Dil Paketi [मराठी]
Kurulum
İlk yapmamız gereken şey, .NET projenize Marathi OCR paketimizi kurmaktır.
Install-Package IronOcr.Languages.Marathi
Kod Örneği
Bu C# kod örneği, Marathice metni bir görüntüden veya PDF belgesinden okur.
// Include the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the OCR engine
var Ocr = new IronTesseract();
// Specify the language as Marathi
Ocr.Language = OcrLanguage.Marathi;
// Load the image or PDF document to be processed
using (var Input = new OcrInput(@"images\Marathi.png"))
{
// Perform OCR on the input document
var Result = Ocr.Read(Input);
// Get the recognized text
var AllText = Result.Text;
// Output the recognized text to console
Console.WriteLine(AllText);
}
}
}
// Include the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the OCR engine
var Ocr = new IronTesseract();
// Specify the language as Marathi
Ocr.Language = OcrLanguage.Marathi;
// Load the image or PDF document to be processed
using (var Input = new OcrInput(@"images\Marathi.png"))
{
// Perform OCR on the input document
var Result = Ocr.Read(Input);
// Get the recognized text
var AllText = Result.Text;
// Output the recognized text to console
Console.WriteLine(AllText);
}
}
}
' Include the IronOcr namespace
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Initialize the OCR engine
Dim Ocr = New IronTesseract()
' Specify the language as Marathi
Ocr.Language = OcrLanguage.Marathi
' Load the image or PDF document to be processed
Using Input = New OcrInput("images\Marathi.png")
' Perform OCR on the input document
Dim Result = Ocr.Read(Input)
' Get the recognized text
Dim AllText = Result.Text
' Output the recognized text to console
Console.WriteLine(AllText)
End Using
End Sub
End Class
Açıklama:
- Bu kod, OCR işlemi yapmak için
IronOCRkütüphanesindenIronTesseractsınıfını kullanır. Ocr.Languageözelliği Marathi dil paketini kullanmak üzere ayarlanmıştır.- Marathi metnini içeren görüntü veya PDF'nin yolunu kullanarak
OcrInputoluşturulur. Ocr.Read()yöntemi girdiyi işler ve metni çıkarır.- Tanınan metin
AllTextdeğişkeninde saklanır ve konsola yazdırılır.

