Pashto OCR in C# and .NET
Bu belgenin diğer versiyonları:
IronOCR, .NET geliştiricilerinin Peştunca dahil olmak üzere 126 dildeki görüntü ve PDF belgelerinden metin okumalarına olanak tanıyan 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.Pashto İçeriği
Bu paket, .NET için 43 OCR dili içerir:
- Peştunca
- PeştuncaBest
- PeştuncaFast
İndir
Peştunca Dil Paketi [پښتو]
Kurulum
Yapmamız gereken ilk şey, .NET projenize Peştunca OCR paketini yüklemek.
Install-Package IronOcr.Languages.Pashto
Kod Örneği
Bu C# kod örneği, bir görüntü veya PDF belgesinden Peştunca metnini okumaktadır.
// 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çası, Peştunca metni tanımak için IronOCR kütüphanesinin nasıl kullanılacağını göstermektedir.
IronTesseractsınıfını kurar, dil olarak Peştuca'yı seçer ve bir görüntü dosyasını (Pashto.png) işleyerek metni çıkarır ve görüntüler.

