Syriac OCR in C# and .NET
Curtis Chau
Updated: 2026年4月23日
IronOCR 是一款 C# 軟體元件,讓 .NET 程式設計師能夠從 126 種語言(包括西里亞語)的圖片和 PDF 文件中讀取文字。
這是 Tesseract 的進階分支版本,專為 .NET 開發人員打造,無論在速度或精準度方面,表現均定期優於其他 Tesseract 引擎。
IronOcr.Languages.Syriac 的內容
此套件包含 108 種適用於 .NET 的 OCR 語言:
- 敘利亞語
- 敘利亞語Best
- 敘利亞語Fast
- 敘利亞字母
- 敘利亞字母Best
- 敘利亞字母Fast
下載
西里亞語語言套件 [Syriac]
安裝
第一步是將 Syriac OCR 套件安裝至您的 .NET 專案中。
程式碼範例
此 C# 程式碼範例可從圖片或 PDF 文件中讀取西里亞文。
// Import the IronOcr library
using IronOcr;
class Program
{
static void Main()
{
// Instantiate the IronTesseract object
var Ocr = new IronTesseract();
// Set the language to Syriac
Ocr.Language = OcrLanguage.Syriac;
// Create an OCR input from an image file
using (var Input = new OcrInput(@"images\Syriac.png"))
{
// Read the image and extract the text
var Result = Ocr.Read(Input);
// Retrieve the full recognized text
var AllText = Result.Text;
// Output the text to the console
Console.WriteLine(AllText);
}
}
}' Import the IronOcr library
Imports IronOcr
Module Program
Sub Main()
' Instantiate the IronTesseract object
Dim Ocr As New IronTesseract()
' Set the language to Syriac
Ocr.Language = OcrLanguage.Syriac
' Create an OCR input from an image file
Using Input As New OcrInput("images\Syriac.png")
' Read the image and extract the text
Dim Result = Ocr.Read(Input)
' Retrieve the full recognized text
Dim AllText = Result.Text
' Output the text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Module在此範例中:
- 我們建立
IronTesseract的實例來處理 OCR。 Ocr.Language已設定為Syriac,以確保此語言的文字辨識精準度。- 我們將一張包含西里亞文的圖片載入
OcrInput,並使用Ocr.Read進行處理。 - 識別出的文字隨後會儲存於
Result.Text中,您可在應用程式中進一步利用此資料。

技術作家
Curtis Chau擁有Carleton大學的電腦科學學士學位,專精於前端開發,擁有Node.js、TypeScript、JavaScript和React的專業知識。Curtis熱衷於建立直觀且美觀的使用者介面,喜愛使用現代框架並建立結構良好、視覺吸引力的手冊。
...
閱讀更多