Sanskrit OCR in C# and .NET
IronOCR は、.NET コーダーがサンスクリット語を含む 126 の言語で画像や PDF ドキュメントからテキストを読み取ることができる C# ソフトウェア コンポーネントです。
これは、特に.NET開発者向けに構築されたTesseractの高度なフォークであり、速度と精度の両方で他のTesseractエンジンを定期的に上回ります。
IronOcr.Languages.Sanskrit の内容
このパッケージには、.NET 用の 49 個の OCR 言語が含まれています。
- サンスクリット語
- サンスクリット語ベスト
- サンスクリットファスト
ダウンロード
サンスクリット語パック[ससकतम]
インストール
最初のステップは、 Sanskrit OCR パッケージを .NET プロジェクトにインストールすることです。
Code Example
この C# コード例は、画像または PDF ドキュメントからサンスクリット語のテキストを読み取ります。
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Create an instance of IronTesseract for OCR operations
var Ocr = new IronTesseract
{
// Set the OCR language to Sanskrit
Language = OcrLanguage.Sanskrit
};
// Define the input image or PDF file containing Sanskrit text
using (var Input = new OcrInput(@"images\Sanskrit.png"))
{
// Perform OCR to read the text from the Input
var Result = Ocr.Read(Input);
// Capture the extracted text
var AllText = Result.Text;
// Print the extracted text to the console
System.Console.WriteLine(AllText);
}
}
}' Import the IronOcr namespace
Imports IronOcr
Class Program
Shared Sub Main()
' Create an instance of IronTesseract for OCR operations
Dim Ocr As New IronTesseract With {
' Set the OCR language to Sanskrit
.Language = OcrLanguage.Sanskrit
}
' Define the input image or PDF file containing Sanskrit text
Using Input As New OcrInput("images\Sanskrit.png")
' Perform OCR to read the text from the Input
Dim Result = Ocr.Read(Input)
' Capture the extracted text
Dim AllText = Result.Text
' Print the extracted text to the console
System.Console.WriteLine(AllText)
End Using
End Sub
End Class' Import the IronOcr namespace
Imports IronOcr
Class Program
Shared Sub Main()
' Create an instance of IronTesseract for OCR operations
Dim Ocr As New IronTesseract With {
' Set the OCR language to Sanskrit
.Language = OcrLanguage.Sanskrit
}
' Define the input image or PDF file containing Sanskrit text
Using Input As New OcrInput("images\Sanskrit.png")
' Perform OCR to read the text from the Input
Dim Result = Ocr.Read(Input)
' Capture the extracted text
Dim AllText = Result.Text
' Print the extracted text to the console
System.Console.WriteLine(AllText)
End Using
End Sub
End Classこの例は、IronTesseractを設定してサンスクリットの画像やPDFでOCRを実行する方法を示しています。
Ocr.Read() メソッドは入力を処理し、テキストコンテンツを抽出します。テキストコンテンツは Result.Text プロパティを通じてアクセス可能です。
Curtis Chauは、カールトン大学でコンピュータサイエンスの学士号を取得し、Node.js、TypeScript、JavaScript、およびReactに精通したフロントエンド開発を専門としています。直感的で美しいユーザーインターフェースを作成することに情熱を持ち、Curtisは現代のフレームワークを用いた開発や、構造の良い視覚的に魅力的なマニュアルの作成を楽しんでいます。