Sundanese OCR in C# and .NET
Bu belgenin diğer versiyonları:
IronOCR, .NET kodlayıcılarının Sundanca dahil olmak üzere 126 dilde görüntüler ve PDF belgelerinden metin okumasını sağlayan bir C# yazılım bileşenidir.
Tesseract'ın ileri düzey bir çatallamasıdır, yalnızca .NET geliştiricileri için oluşturulmuş olup hız ve doğruluk açısından diğer Tesseract motorlarını düzenli olarak geride bırakmaktadır.
IronOcr.Languages.Sundanese İçeriği
Bu paket, .NET için 52 OCR dili içerir:
- Sundanca
- SundaneseBest
- SundaneseFast
İndirme
Sundanca Dil Paketi [Basa Sunda]
Kurulum
Yapmamız gereken ilk şey, Sundanca OCR paketimizi .NET projenize yüklemektir.
Install-Package IronOcr.Languages.Sundanese
Kod Örneği
Bu C# kod örneği, bir görüntü veya PDF belgesinden Sundanca metin okumayı gösterir.
// 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
- OCR işlevselliğini kullanmak için önce
IronOcrnamespace'ini içe aktarıyoruz. - Ana OCR motorumuz olarak hareket eden bir
IronTesseractörneği oluşturuluyor. - Motorun Sundanese metni okumayı beklemesi gerektiğini belirtmek için
LanguageözelliğiniOcrLanguage.Sundaneseolarak ayarlıyoruz. - OCR motorumuz için görüntü dosya kaynağını belirtmek amacıyla bir
OcrInputnesnesi oluşturuyoruz. Readyöntemi girdiyi işler ve metni tanımaya çalışır.- Tanınan metin
AllTextdeğişkenine depolanır ve ardından konsola yazdırılır.
Bu kurulum, bir .NET ortamında IronOCR kütüphanesi kullanılarak görüntülerden Sundanca dili metinlerinin güçlü bir şekilde tanınmasını sağlar.

