C# および .NET でのデンマーク語 OCR
このドキュメントの他のバージョン:
IronOCR は、.NET コーダーがデンマーク語を含む 126 の言語で画像や PDF ドキュメントからテキストを読み取ることを可能にする C# ソフトウェア コンポーネントです。
これは、.NET 開発者専用に構築された Tesseract の高度なフォークであり、速度と精度の両方で他の Tesseract エンジンを常に上回っています。
IronOcr.Languages.Danish の内容
このパッケージには、.NET 用の 61 の OCR 言語が含まれています。
- Danish
- DanishBest
- DanishFast
- DanishFraktur
ダウンロード
デンマーク語言語パック[デンマーク語]
- Zip としてダウンロード
- NuGetでインストール
インストール
最初のステップは、デンマーク語のOCR パッケージを .NET プロジェクトにインストールすることです。
コード例
この C# コード例では、IronOCR を使用して画像または PDF ドキュメントからデンマーク語のテキストを読み取ります。
// Import the IronOcr namespace to access OCR functionalities
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract object, which will handle OCR operations
var Ocr = new IronTesseract();
// Set the language for OCR to Danish
Ocr.Language = OcrLanguage.Danish;
// Using a 'using' statement to ensure the OcrInput object is disposed of correctly
using (var Input = new OcrInput(@"images\Danish.png"))
{
// Perform OCR on the input image and store the result
var Result = Ocr.Read(Input);
// Extract the recognized text from the result
var AllText = Result.Text;
// Output the extracted text to the console
Console.WriteLine(AllText);
}
}
}' Import the IronOcr namespace to access OCR functionalities
Imports IronOcr
Module Program
Sub Main()
' Initialize the IronTesseract object, which will handle OCR operations
Dim Ocr As New IronTesseract()
' Set the language for OCR to Danish
Ocr.Language = OcrLanguage.Danish
' Using a 'Using' statement to ensure the OcrInput object is disposed of correctly
Using Input As New OcrInput("images\Danish.png")
' Perform OCR on the input image and store the result
Dim Result = Ocr.Read(Input)
' Extract the recognized text from the result
Dim AllText = Result.Text
' Output the extracted text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Module' Import the IronOcr namespace to access OCR functionalities
Imports IronOcr
Module Program
Sub Main()
' Initialize the IronTesseract object, which will handle OCR operations
Dim Ocr As New IronTesseract()
' Set the language for OCR to Danish
Ocr.Language = OcrLanguage.Danish
' Using a 'Using' statement to ensure the OcrInput object is disposed of correctly
Using Input As New OcrInput("images\Danish.png")
' Perform OCR on the input image and store the result
Dim Result = Ocr.Read(Input)
' Extract the recognized text from the result
Dim AllText = Result.Text
' Output the extracted text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Moduleこの例では、IronOCRを使用して画像ファイルからデンマーク語のテキストを読み取る方法を示します。OcrInputでロードされます。 Ocr.ReadはOCRを実行し、認識されたテキストを抽出して印刷します。
Curtis Chauは、カールトン大学でコンピュータサイエンスの学士号を取得し、Node.js、TypeScript、JavaScript、およびReactに精通したフロントエンド開発を専門としています。直感的で美しいユーザーインターフェースを作成することに情熱を持ち、Curtisは現代のフレームワークを用いた開発や、構造の良い視覚的に魅力的なマニュアルの作成を楽しんでいます。