Hebrew OCR in C# and .NET
Curtis Chau
Updated: 2026年5月9日
此文件的其他版本:
IronOCR 是一個 C# 軟體組件,允許 .NET 程式員從圖片和 PDF 文件中讀取包括希伯來文在內的 126 種語言的文字。
它是 Tesseract 的一個進階分支,專為 .NET 開發者而建構,在速度和準確性方面經常超越其他 Tesseract 引擎。
IronOcr.Languages.Hebrew 的內容
此套件包含 108 種適用於 .NET 的 OCR 語言:
- 希伯來文
- 希伯來文優化版
- 希伯來文快速版
- 希伯來字母表
- 希伯來字母表優化版
- 希伯來字母表快速版
下載
希伯來語言包 [עברית]
安裝
我們要做的第一件事是將希伯來文OCR套件安裝到您的 .NET 專案中。
程式範例
此 C# 程式碼範例從圖像或 PDF 文件中讀取希伯來文字。
// Include the IronOcr namespace to work with OCR features
using IronOcr;
// Create an OCR engine
var Ocr = new IronTesseract();
// Set the OCR engine language to Hebrew
Ocr.Language = OcrLanguage.Hebrew;
// Process the image and extract text using OCR
using (var Input = new OcrInput(@"images\Hebrew.png"))
{
// Read the text from the input image
var Result = Ocr.Read(Input);
// Store the extracted text
var AllText = Result.Text;
// Output the extracted text to the console (optional)
Console.WriteLine(AllText);
}' Include the IronOcr namespace to work with OCR features
Imports IronOcr
' Create an OCR engine
Dim Ocr As New IronTesseract()
' Set the OCR engine language to Hebrew
Ocr.Language = OcrLanguage.Hebrew
' Process the image and extract text using OCR
Using Input As New OcrInput("images\Hebrew.png")
' Read the text from the input image
Dim Result = Ocr.Read(Input)
' Store the extracted text
Dim AllText = Result.Text
' Output the extracted text to the console (optional)
Console.WriteLine(AllText)
End Using- IronTesseract:此類用於初始化 OCR 引擎。
- OcrInput:這表示 OCR 引擎將讀取的輸入圖像或文件。
- Ocr.Read:此方法處理輸入並返回包含提取文字的結果。
- Result.Text:儲存提取的文字,可用於進一步處理。

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