C# 中的切羅基語 OCR
Curtis Chau
已更新: 2026年8月2日
IronOCR 是一個 C# 軟體元件,允許 .NET 程式設計師從圖像和 PDF 文件中讀取 126 種語言的文字,包括切諾基語。
它是 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' 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屬性將語言設置為Cherokee,告訴OCR引擎識別Cherokee文字。 - OcrInput: 提供給
OcrInput類的輸入路徑,圖像或PDF文件位於此處。 - Ocr.Read: 在OCR對像上調用
Read方法,並傳入輸入。 它執行OCR識別過程。 - Result.Text: 從結果中提取識別的文本,並存儲在
AllText變量中以供進一步使用。 - Console output: 識別的文本被打印到控制台。
Curtis Chau 擁有卡爾頓大學計算機科學學士學位,專注於前端開發,擅長於 Node.js、TypeScript、JavaScript 和 React。Curtis 熱衷於創建直觀且美觀的用戶界面,喜歡使用現代框架並打造結構良好、視覺吸引人的手冊。