Pashto OCR in C# and .NET
Inne wersje tego dokumentu:
IronOCR to komponent oprogramowania C#, umożliwiajacy programistom .NET odczytywanie tekstu z obrazow i dokumentow PDF w 126 językach, wlaczajac w to Paszto. Jest to zaawansowany fork Tesseracta, zbudowany wyłącznie dla deweloperów .NET i regularnie przewyższający inne silniki Tesseract pod względem szybkości i dokładności.
Zawartosc IronOcr.Languages.Pashto
Ten pakiet zawiera 43 języki OCR dla .NET:
- Paszto
- PasztoBest
- PasztoFast
Pobieranie
Pashto Language Pack [پښتو]
Instalacja
Pierwsza rzecza, która musimy zrobic, jest zainstalowanie naszego pakietu OCR Paszto w Twoim projekcie .NET.
Install-Package IronOcr.Languages.Pashto
Przyklad kodu
Ten przyklad kodu C# odczytuje tekst w języku Paszto z obrazu lub dokumentu PDF.
// 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
- Ten fragment kodu pokazuje, jak wykorzystac biblioteke IronOCR do rozpoznawania tekstu w języku Paszto.
- Tworzy klasę
IronTesseract, wybiera język paszto i przetwarza plik graficzny (Pashto.png) w celu wyodrębnienia i wyświetlenia tekstu.

