Pashto OCR in C# and .NET
Bu belgenin diğer versiyonları:
IronOCR, C# yazılım bileşeni olarak, .NET kodlayıcılarına Peştuca dahil 126 dildeki görüntülerden ve PDF belgelerinden metin okuma imkanı tanır. 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.Pashto İçeriği
Bu paket, .NET için 43 OCR dilini içerir:
- Peştuca
- PeştucaEnIyi
- PeştucaHızlı
İndirme
Peştuca Dil Paketi [پښتو]
Kurulum
Yapmamız gereken ilk şey, .NET projenize Peştuca OCR paketini kurmaktır.
Install-Package IronOcr.Languages.Pashto
Kod Örneği
Bu C# kod örneği, bir görüntü veya PDF belgesinden Peştuca metni okur.
// Import the IronOcr namespace
using IronOcr;
public class PashtoOcrExample
{
public static void Main()
{
// Create an instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the OCR language to Pashto
Ocr.Language = OcrLanguage.Pashto;
// Specify the image file containing the Pashto text
using (var Input = new OcrInput(@"images\Pashto.png"))
{
// Perform the OCR operation on the input image
var Result = Ocr.Read(Input);
// Store the extracted text from the image in a string variable
var AllText = Result.Text;
}
}
}
// Import the IronOcr namespace
using IronOcr;
public class PashtoOcrExample
{
public static void Main()
{
// Create an instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the OCR language to Pashto
Ocr.Language = OcrLanguage.Pashto;
// Specify the image file containing the Pashto text
using (var Input = new OcrInput(@"images\Pashto.png"))
{
// Perform the OCR operation on the input image
var Result = Ocr.Read(Input);
// Store the extracted text from the image in a string variable
var AllText = Result.Text;
}
}
}
' Import the IronOcr namespace
Imports IronOcr
Public Class PashtoOcrExample
Public Shared Sub Main()
' Create an instance of the IronTesseract class
Dim Ocr = New IronTesseract()
' Set the OCR language to Pashto
Ocr.Language = OcrLanguage.Pashto
' Specify the image file containing the Pashto text
Using Input = New OcrInput("images\Pashto.png")
' Perform the OCR operation on the input image
Dim Result = Ocr.Read(Input)
' Store the extracted text from the image in a string variable
Dim AllText = Result.Text
End Using
End Sub
End Class
- Bu kod parçacığı, Peştuca metni tanımak için IronOCR kutuphanesini nasıl kullanacağınızı gösterir.
IronTesseractsınıfını kurar, dili Peştuca olarak seçer ve bir görüntü dosyasını (Pashto.png) işleyerek metni çıkartır ve görüntüler.

