Sundanese OCR in C# and .NET
Bu belgenin diğer versiyonları:
IronOCR, .NET kodlayıcıların Sundaca da 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.Sundanese İçeriği
Bu paket, .NET için 52 OCR dilini içerir:
- Sundanca
- SundancaBest
- SundancaFast
İndir
Sundaca Dil Paketi [Basa Sunda]
Kurulum
İlk adım, .NET projenize Sunda Dilinde OCR paketini yüklemektir.
Install-Package IronOcr.Languages.Sundanese
Kod Örneği
Bu C# kod örneği, bir Görüntü veya PDF belgesinden Sunda metni okur.
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Specify the language the OCR engine should use
Ocr.Language = OcrLanguage.Sundanese;
// Initialize the OCR input with an image file containing Sundanese text
using (var Input = new OcrInput(@"images\Sundanese.png"))
{
// Process the input and get the result
var Result = Ocr.Read(Input);
// Extract all recognized text from the result
var AllText = Result.Text;
// Output the recognized text
System.Console.WriteLine(AllText);
}
}
}
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Specify the language the OCR engine should use
Ocr.Language = OcrLanguage.Sundanese;
// Initialize the OCR input with an image file containing Sundanese text
using (var Input = new OcrInput(@"images\Sundanese.png"))
{
// Process the input and get the result
var Result = Ocr.Read(Input);
// Extract all recognized text from the result
var AllText = Result.Text;
// Output the recognized text
System.Console.WriteLine(AllText);
}
}
}
' Import the IronOcr namespace
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create a new instance of the IronTesseract class
Dim Ocr = New IronTesseract()
' Specify the language the OCR engine should use
Ocr.Language = OcrLanguage.Sundanese
' Initialize the OCR input with an image file containing Sundanese text
Using Input = New OcrInput("images\Sundanese.png")
' Process the input and get the result
Dim Result = Ocr.Read(Input)
' Extract all recognized text from the result
Dim AllText = Result.Text
' Output the recognized text
System.Console.WriteLine(AllText)
End Using
End Sub
End Class
Açıklama
- Öncelikle, OCR işlevini kullanmak için
IronOcrad alanını içe aktarıyoruz. - OCR motorumuz olarak işlev gören bir
IronTesseractörneği oluşturulur. LanguageözelliğiniOcrLanguage.Sundaneseolarak ayarlayarak, motorun Sundanca metin okumayı beklemesi gerektiğini belirtiriz.- OCR motorumuz için görüntü dosyası kaynağını belirtmek üzere bir
OcrInputnesnesi oluşturuyoruz. Readyöntemi, girişi işler ve metni tanımaya çalışır.- Tanınan metin
AllTextdeğişkeninde saklanır ve ardından konsola PRINT edilir.
Bu ayar, .NET ortamında IronOCR kütüphanesini kullanarak görüntülerden Sunda dili metninin etkin bir şekilde tanınmasını sağlar.

