使用 C# 和 .NET 實作埃塞俄比亞字母 OCR
This article was translated from English: Does it need improvement?
TranslatedView the article in English
IronOCR 是一個 C# 軟體元件,允許 .NET 程式設計師從圖像和 PDF 文件中讀取 126 種語言的文本,包括埃塞俄比亞字母。
它是 Tesseract 的一個高級分支,專為 .NET 開發人員構建,在速度和準確性方面通常優於其他 Tesseract 引擎。
IronOcr.語言.埃塞俄比亞語的內容
此軟體包包含 73 種適用於 .NET 的 OCR 語言:
衣索比亞字母
- 埃塞俄比亞字母表最佳 衣索比亞字母Fast
下載
埃塞俄比亞字母語言包[Ge'ez]
下載為Zip 檔案
- 使用NuGet安裝
安裝
我們首先需要做的是將我們的埃塞俄比亞字母OCR 套件安裝到您的 .NET 專案中。
Install-Package IronOCR.Languages.Ethiopic
程式碼範例
這段 C# 程式碼範例從圖像或 PDF 文件中讀取埃塞俄比亞字母文字。
// First, ensure the IronOcr.Languages.Ethiopic package is installed
using IronOcr;
public class EthiopicOcrExample
{
public void ReadEthiopicText()
{
// Create an instance of IronTesseract
var Ocr = new IronTesseract();
// Set the language property to Ethiopic
Ocr.Language = OcrLanguage.Ethiopic;
// Define the input image containing Ethiopic text
using (var Input = new OcrInput(@"images\Ethiopic.png"))
{
// Perform OCR to read text from the image
var Result = Ocr.Read(Input);
// Store the recognized text
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}// First, ensure the IronOcr.Languages.Ethiopic package is installed
using IronOcr;
public class EthiopicOcrExample
{
public void ReadEthiopicText()
{
// Create an instance of IronTesseract
var Ocr = new IronTesseract();
// Set the language property to Ethiopic
Ocr.Language = OcrLanguage.Ethiopic;
// Define the input image containing Ethiopic text
using (var Input = new OcrInput(@"images\Ethiopic.png"))
{
// Perform OCR to read text from the image
var Result = Ocr.Read(Input);
// Store the recognized text
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}' First, ensure the IronOcr.Languages.Ethiopic package is installed
Imports IronOcr
Public Class EthiopicOcrExample
Public Sub ReadEthiopicText()
' Create an instance of IronTesseract
Dim Ocr = New IronTesseract()
' Set the language property to Ethiopic
Ocr.Language = OcrLanguage.Ethiopic
' Define the input image containing Ethiopic text
Using Input = New OcrInput("images\Ethiopic.png")
' Perform OCR to read text from the image
Dim Result = Ocr.Read(Input)
' Store the recognized text
Dim AllText = Result.Text
' Output the recognized text
Console.WriteLine(AllText)
End Using
End Sub
End Class$vbLabelText $csharpLabel
- 此範例建立
IronTesseract實例以執行 OCR 操作。 - 它使用
OcrLanguage.Ethiopic將語言設定為埃塞俄比亞語。 OcrInput用於定義來源影像。Read方法執行 OCR 並傳回包含識別文字的結果。- 辨識出的文字儲存在
AllText中,並列印到控制台。





