C# と .NET でのパシュトー語 OCR
Other versions of this document:
IronOCR は、.NET コーダーがパシュトー語を含む 126 の言語で画像や PDF ドキュメントからテキストを読み取ることを可能にする C# ソフトウェア コンポーネントです。 これはTesseractの高度なフォークであり、.NET開発者専用に構築され、速度と精度の両方で他のTesseractエンジンを定期的に上回ります。
IronOcr.Languages.Pashto の内容
このパッケージには、.NET 用の 43 の OCR 言語が含まれています。
- パシュトー語
- パシュトゥーベスト
- パシュトゥーファスト
ダウンロード
パシュトー語言語パック[パシュトー語]
インストール
最初に、 Pashto OCR パッケージを .NET プロジェクトにインストールする必要があります。
Install-Package IronOCR.Languages.Pashto
Code Example
この C# コード例は、画像または 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- このコード スニペットは、パシュトー語のテキストを認識するために IronOCR ライブラリを利用する方法を示しています。
IronTesseractクラスを設定し、言語としてパシュトー語を選択し、画像ファイル (Pashto.png) を処理してテキストを抽出して表示します。





