C# および .NET でのアラビア語 OCR
Curtis Chau
更新日:
このドキュメントの他のバージョン:
IronOCR は、.NET 開発者が画像や PDF 文書からテキストを読み取るための C# ソフトウェアコンポーネントです。アラビア語を含む 126 の言語に対応しています。
.NET 開発者専用に開発された Tesseract の高度なフォークで、速度と精度の両面で他の Tesseract エンジンを上回ることがよくあります。
IronOcr.Languages.Arabic の内容
このパッケージには、.NET 用の 108 の OCR 対応言語が含まれています。
- Arabic
- ArabicBest
- ArabicFast
- ArabicAlphabet
- ArabicAlphabetBest
- ArabicAlphabetFast
ダウンロード
アラビア語の言語パック[العربية]
インストール
最初に、アラビア語の OCR パッケージを .NET プロジェクトにインストールしてください。
コード例
この C# コード例は、画像または PDF ドキュメントからアラビア語のテキストを読み取ります。
// Import the IronOcr namespace to use its classes.
using IronOcr;
// Create a new instance of the IronTesseract class.
var Ocr = new IronTesseract();
// Set the OCR language to Arabic.
Ocr.Language = OcrLanguage.Arabic;
// Use a using statement to ensure that resources are disposed of correctly.
using (var Input = new OcrInput(@"images\Arabic.png"))
{
// Perform OCR on the input image or document.
var Result = Ocr.Read(Input);
// Retrieve all recognized text from the document.
var AllText = Result.Text;
// Optionally, you can output the text to the console or use it otherwise.
// Console.WriteLine(AllText);
}' Import the IronOcr namespace to use its classes.
Imports IronOcr
' Create a new instance of the IronTesseract class.
Private Ocr = New IronTesseract()
' Set the OCR language to Arabic.
Ocr.Language = OcrLanguage.Arabic
' Use a using statement to ensure that resources are disposed of correctly.
Using Input = New OcrInput("images\Arabic.png")
' Perform OCR on the input image or document.
Dim Result = Ocr.Read(Input)
' Retrieve all recognized text from the document.
Dim AllText = Result.Text
' Optionally, you can output the text to the console or use it otherwise.
' Console.WriteLine(AllText);
End Using' Import the IronOcr namespace to use its classes.
Imports IronOcr
' Create a new instance of the IronTesseract class.
Private Ocr = New IronTesseract()
' Set the OCR language to Arabic.
Ocr.Language = OcrLanguage.Arabic
' Use a using statement to ensure that resources are disposed of correctly.
Using Input = New OcrInput("images\Arabic.png")
' Perform OCR on the input image or document.
Dim Result = Ocr.Read(Input)
' Retrieve all recognized text from the document.
Dim AllText = Result.Text
' Optionally, you can output the text to the console or use it otherwise.
' Console.WriteLine(AllText);
End Usingテクニカルライター
Curtis Chauは、カールトン大学でコンピュータサイエンスの学士号を取得し、Node.js、TypeScript、JavaScript、およびReactに精通したフロントエンド開発を専門としています。直感的で美しいユーザーインターフェースを作成することに情熱を持ち、Curtisは現代のフレームワークを用いた開発や、構造の良い視覚的に魅力的なマニュアルの作成を楽しんでいます。