C# と .NET でのマルタ語 OCR
Other versions of this document:
*マルタ語
IronOCR は、.NET コーダーがマルタ語を含む 126 の言語で画像や PDF ドキュメントからテキストを読み取ることを可能にする C# ソフトウェア コンポーネントです。
これは、特に.NET開発者向けに構築されたTesseractの高度なフォークであり、速度と精度の両方で他のTesseractエンジンを定期的に上回ります。
IronOcr.Languages.Maltese の内容
このパッケージには、.NET 用の 46 の OCR 言語が含まれています。
- マルタ語
- マルタベスト
- マルタファースト
ダウンロード
マルタ語言語パック [Malti]
インストール
最初に、マルタ語OCR パッケージを .NET プロジェクトにインストールする必要があります。
Install-Package IronOCR.Languages.Maltese
Code Example
この C# コード例は、画像または PDF ドキュメントからマルタ語のテキストを読み取ります。
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Maltese
Ocr.Language = OcrLanguage.Maltese;
// Define the input image or PDF document
using (var Input = new OcrInput(@"images\Maltese.png"))
{
// Perform OCR on the input and retrieve the result
var Result = Ocr.Read(Input);
// Get all the recognized text
var AllText = Result.Text;
// Output the recognized text to the console
Console.WriteLine(AllText);
}
}
}// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Maltese
Ocr.Language = OcrLanguage.Maltese;
// Define the input image or PDF document
using (var Input = new OcrInput(@"images\Maltese.png"))
{
// Perform OCR on the input and retrieve the result
var Result = Ocr.Read(Input);
// Get all the recognized text
var AllText = Result.Text;
// Output the recognized text to the console
Console.WriteLine(AllText);
}
}
}' Import the IronOcr namespace
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Initialize the IronTesseract OCR engine
Dim Ocr = New IronTesseract()
' Set the OCR language to Maltese
Ocr.Language = OcrLanguage.Maltese
' Define the input image or PDF document
Using Input = New OcrInput("images\Maltese.png")
' Perform OCR on the input and retrieve the result
Dim Result = Ocr.Read(Input)
' Get all the recognized text
Dim AllText = Result.Text
' Output the recognized text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Classこの例では、IronTesseract OCR エンジンを使用して、 Maltese.pngという名前の画像ファイルからテキストを読み取ります。 認識されたテキストはコンソールに出力されます。 OCR が効果的に機能するには、画像パスが正しいこと、および画像ファイルにマルタ語のテキストが含まれていることを確認してください。 usingステートメントは、リソースが不要になったときに適切に破棄されることを保証します。





