Panjabi OCR in C# and .NET
Bu belgenin diğer versiyonları:
IronOCR, .NET kodlayıcılarının 126 dilde, Panjabi de dahil olmak üzere, görüntülerden ve PDF belgelerinden metin okumalarını sağlayan 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.Panjabi İçeriği
Bu paket, .NET için 46 OCR dili içerir:
- Panjabi
- PanjabiBest
- PanjabiFast
İndirme
Panjabi Dil Paketi [ਪਜਾਬੀ]
Kurulum
İlk yapmamız gereken, .NET projenize Panjabi OCR paketini yüklemektir.
Install-Package IronOcr.Languages.Panjabi
Kod Örneği
Bu C# kod örneği, bir görüntü veya PDF belgesinden Panjabi metnini okur.
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the language to Panjabi
Ocr.Language = OcrLanguage.Panjabi;
// Define the input image or PDF file
using (var Input = new OcrInput(@"images\Panjabi.png"))
{
// Perform OCR on the input file
var Result = Ocr.Read(Input);
// Extract and store the recognized text from the OCR result
var AllText = Result.Text;
}
}
}
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the language to Panjabi
Ocr.Language = OcrLanguage.Panjabi;
// Define the input image or PDF file
using (var Input = new OcrInput(@"images\Panjabi.png"))
{
// Perform OCR on the input file
var Result = Ocr.Read(Input);
// Extract and store the recognized text from the OCR result
var AllText = Result.Text;
}
}
}
' Import the IronOcr namespace
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create a new instance of the IronTesseract class
Dim Ocr = New IronTesseract()
' Set the language to Panjabi
Ocr.Language = OcrLanguage.Panjabi
' Define the input image or PDF file
Using Input = New OcrInput("images\Panjabi.png")
' Perform OCR on the input file
Dim Result = Ocr.Read(Input)
' Extract and store the recognized text from the OCR result
Dim AllText = Result.Text
End Using
End Sub
End Class
Açıklama
- IronTesseract: Bu, IronOCR tarafından OCR işlemleri için sağlanan ana sınıftır.
- Ocr.Language: OCR motorunun hangi dili kullanacağını belirtiriz. Burada Punjabi olarak ayarlandı.
- OcrInput: Bu sınıf, üzerinde OCR işlemi yapılması gereken giriş dosyasını (görüntü veya PDF) belirtmek için kullanılır.
- Ocr.Read(): Bu yöntem, gerçek OCR görevini gerçekleştirir ve çıkarılan metni içeren bir sonuç döndürür.
- Result.Text: Bu, giriş dosyasına OCR uygulandıktan sonra çıkartılan metni içerir.
Bu örnek, IronOCR kutuphanesini kullanarak Punjabi metni görüntülerden veya PDF belgelerinden etkili bir şekilde çıkartmayı gösterir.

