Divehi OCR in C# and .NET
IronOCR, .NET kodlayıcılarının Divehi dahil 126 dilde resimler ve PDF belgeleri üzerinden metin okuması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.Divehi İçeriği
Bu paket, .NET için 43 OCR dili içerir:
- Divehi
- DivehiBest
- DivehiFast
İndir
Divehi Dil Paketi [ދވހ]
Kurulum
Yapmamız gereken ilk şey, Divehi OCR paketimizi .NET projenize yüklemektir.
Install-Package IronOcr.Languages.Divehi
Kod Örneği
Bu C# kod örneği, bir resim veya PDF belgesinden Divehi metnini okur.
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Create an instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Divehi
Ocr.Language = OcrLanguage.Divehi;
// Load the image or PDF document into the OCR processor
using (var Input = new OcrInput(@"images\Divehi.png"))
{
// Perform OCR on the input document
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Output the extracted text to the console
Console.WriteLine(AllText);
}
}
}
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Create an instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Divehi
Ocr.Language = OcrLanguage.Divehi;
// Load the image or PDF document into the OCR processor
using (var Input = new OcrInput(@"images\Divehi.png"))
{
// Perform OCR on the input document
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Output the extracted text to the console
Console.WriteLine(AllText);
}
}
}
' Import the IronOcr namespace
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create an instance of the IronTesseract OCR engine
Dim Ocr = New IronTesseract()
' Set the OCR language to Divehi
Ocr.Language = OcrLanguage.Divehi
' Load the image or PDF document into the OCR processor
Using Input = New OcrInput("images\Divehi.png")
' Perform OCR on the input document
Dim Result = Ocr.Read(Input)
' Extract all recognized text
Dim AllText = Result.Text
' Output the extracted text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class
Açıklama
- IronOCR'yi içe aktarma: Örnek, gerekli IronOCR ad alanını içe aktararak başlar.
- OCR Motoru Oluşturma:
IronTesseractörneği olan OCR motoru oluşturulur. - Dili Belirtme: OCR işleme dili Divehi olarak ayarlanır ve bu dil için özel olarak doğru tanıma sağlanır.
- Giriş Yükleniyor:
OcrInputkullanılarak bir resim veya PDF belgesi açılır ve metin çıkarımı için hazır hale gelir. - OCR gerçekleştirme:
Readyöntemi, girişi işler ve metni çıkarır. - Metin Çıkarma: Tanınan metin
AllTextiçinde saklanır ve konsola PRINT edilir.
Bu kod, IronOCR'yi dijital belgelerden Divehi alfabesini okumak için güçlü ancak basit bir şekilde kullanmayı gösterir.

