Cherokee OCR in C#
Curtis Chau
Updated: 2026年4月23日
IronOCR 是一個 C# 軟體元件,讓 .NET 開發人員能夠從 126 種語言(包括切羅基語)的圖片和 PDF 文件中讀取文字。
這是 Tesseract 的進階分支版本,專為 .NET 開發人員打造,無論在速度或準確度方面,其表現均經常優於其他 Tesseract 引擎。
IronOcr.Languages.Cherokee 的內容
此套件包含 120 種適用於 .NET 的 OCR 語言:
- CherokeeAlphabet
- CherokeeAlphabetBest
- CherokeeAlphabetFast
- Cherokee
- CherokeeBest
- CherokeeFast
下載
切羅基語語言套件 [ᏣᎳᎩ ᎦᏬᏂᎯᏍᏗ]
安裝
我們首先必須將 Cherokee OCR 套件安裝至您的 .NET 專案中。
程式碼範例
此 C# 程式碼範例用於從圖片或 PDF 文件中讀取切羅基語文字。
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Create an instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the language for OCR to Cherokee
Ocr.Language = OcrLanguage.Cherokee;
// Use OcrInput to specify the image or PDF to be read
using (var Input = new OcrInput(@"images\Cherokee.png"))
{
// Perform OCR on the input document
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Display the recognized text
Console.WriteLine(AllText);
}
}
}' Import the IronOcr namespace
Imports IronOcr
Module Program
Sub Main()
' Create an instance of the IronTesseract class
Dim Ocr As New IronTesseract()
' Set the language for OCR to Cherokee
Ocr.Language = OcrLanguage.Cherokee
' Use OcrInput to specify the image or PDF to be read
Using Input As New OcrInput("images\Cherokee.png")
' Perform OCR on the input document
Dim Result = Ocr.Read(Input)
' Extract all recognized text
Dim AllText = Result.Text
' Display the recognized text
Console.WriteLine(AllText)
End Using
End Sub
End Module以下是關於程式碼運作方式的簡要說明:
- **IronTesseract:**建立 IronTesseract 類別的實例以處理 OCR 操作。
- **OcrLanguage.Cherokee:**透過
OcrLanguage.Cherokee屬性將語言設定為切羅基語,此設定會指示 OCR 引擎識別切羅基語文字。 - **OcrInput:**提供一個輸入路徑至
OcrInput類別,該路徑存放著圖像或 PDF 文件。 - **Ocr.Read:**在 OCR 物件上呼叫
Read方法,並傳入輸入內容。 它執行 OCR 處理。 - **Result.Text:**從結果中擷取已識別的文字,並將其儲存於
AllText變數中以供後續使用。 - **控制台輸出:**識別出的文字將輸出至控制台。

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