Syriac OCR in C# and .NET
This article was translated from English: Does it need improvement?
Translated
View the article in English
IronOCR是一個 C# 軟體元件,允許.NET設計師從圖像和 PDF 文件中讀取 126 種語言(包括敘利亞)的文字。
它是 Tesseract 的一個高級分支,專為.NET開發人員構建,在速度和準確性方面通常優於其他 Tesseract 引擎。
IronOCR的內容。語言。敘利亞語
此軟體包包含 108 種適用於.NET的 OCR 語言:
敘利亞語 敘利亞語Best 敘利亞語Fast 敘利亞字母
- 敘利亞字母表最佳
- 敘利亞字母表快速
下載
敘利亞語語言包 [敘利亞語]
下載為Zip 檔案
安裝
Install-Package IronOcr.Languages.Syriac
程式碼範例
這段 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
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
Friend Class Program
Shared Sub Main()
' Instantiate the IronTesseract object
Dim Ocr = New IronTesseract()
' Set the language to Syriac
Ocr.Language = OcrLanguage.Syriac
' Create an OCR input from an image file
Using Input = 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 Class
$vbLabelText
$csharpLabel
在這個例子中:
- 我們建立
IronTesseract實例來處理 OCR。 - 將
Ocr.Language設定為Syriac,以確保對該語言進行準確的文字辨識。 - 我們將包含敘利亞文字的圖像載入到
OcrInput中,並使用Ocr.Read對其進行處理。 - 然後,識別出的文字儲存在
Result.Text中,可以在您的應用程式中進一步使用。

