Panjabi OCR in C# and .NET
Curtis Chau
更新日: 2026年8月2日
このドキュメントの他のバージョン:
IronOCR は、.NET コーダーがパンジャブ語を含む 126 の言語で画像や PDF ドキュメントからテキストを読み取ることを可能にする C# ソフトウェア コンポーネントです。 これは Tesseract の高度なフォークであり、.NET 開発者専用に構築されており、速度と精度の両方で他の Tesseract エンジンを常に上回っています。
IronOcr.Languages.Panjabi の内容
このパッケージには、.NET 用の 46 の OCR 言語が含まれています。
- パンジャブ語
- パンジャブ語Best
- パンジャビファスト
ダウンロード
パンジャブ語言語パック[パンジャブ語]
インストール
最初に、 Panjabi OCR パッケージを .NET プロジェクトにインストールする必要があります。
Code Example
この C# コード例は、画像または PDF ドキュメントからパンジャブ語のテキストを読み取ります。
// 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
Module Program
Sub Main()
' Create a new instance of the IronTesseract class
Dim Ocr As New IronTesseract()
' Set the language to Panjabi
Ocr.Language = OcrLanguage.Panjabi
' Define the input image or PDF file
Using Input As 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 Module' Import the IronOcr namespace
Imports IronOcr
Module Program
Sub Main()
' Create a new instance of the IronTesseract class
Dim Ocr As New IronTesseract()
' Set the language to Panjabi
Ocr.Language = OcrLanguage.Panjabi
' Define the input image or PDF file
Using Input As 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 Module説明
- IronTesseract: これはIronOCRが提供するOCR処理用の主なクラスです。
- Ocr.Language: OCRエンジンで使用する言語を指定します。 ここでは、パンジャブ語に設定されています。
- OcrInput: OCRを実行する入力ファイル(画像またはPDF)を指定するために使用されるクラスです。
Ocr.Read(): 実際のOCRタスクを実行し、抽出されたテキストを含む結果を返すメソッドです。- Result.Text: 入力ファイル上でOCRが実行された後に抽出されたテキストが含まれています。
この例では、IronOCR ライブラリを効果的に使用して、.NET アプリケーション内の画像または PDF ドキュメントからパンジャブ語のテキストを抽出する方法を示します。
テクニカルライター
Curtis Chauは、カールトン大学でコンピュータサイエンスの学士号を取得し、Node.js、TypeScript、JavaScript、およびReactに精通したフロントエンド開発を専門としています。直感的で美しいユーザーインターフェースを作成することに情熱を持ち、Curtisは現代のフレームワークを用いた開発や、構造の良い視覚的に魅力的なマニュアルの作成を楽しんでいます。