IronOCR 語言 泰語 使用 C# 和 .NET 實作泰文字母 OCR Curtis Chau 更新:8月 20, 2025 下載 IronOCR NuGet 下載 DLL 下載 Windows 安裝程式 開始免費試用 法學碩士副本 法學碩士副本 將頁面複製為 Markdown 格式,用於 LLMs 在 ChatGPT 中打開 請向 ChatGPT 諮詢此頁面 在雙子座打開 請向 Gemini 詢問此頁面 在雙子座打開 請向 Gemini 詢問此頁面 打開困惑 向 Perplexity 詢問有關此頁面的信息 分享 在 Facebook 上分享 分享到 X(Twitter) 在 LinkedIn 上分享 複製連結 電子郵件文章 This article was translated from English: Does it need improvement? Translated View the article in English Other versions of this document: 泰文 新增 125 種 OCR 語言 IronOCR 是一個 C# 軟體元件,允許 .NET 程式設計師從圖像和 PDF 文件中讀取 126 種語言的文本,包括泰語字母。 它是 Tesseract 的一個高級分支,專為 .NET 開發人員構建,在速度和準確性方面通常優於其他 Tesseract 引擎。 IronOcr.Languages.Thai 的內容 此軟體包包含 96 種適用於 .NET 的 OCR 語言: 泰語 ThaiBest ThaiFast 泰文字母 ThaiAlphabetBest ThaiAlphabetFast 下載 泰語字母語言包[ไทย] 下載為Zip 檔案 使用NuGet安裝 安裝 我們首先需要做的就是將我們的泰文字母OCR 套件安裝到您的 .NET 專案中。 Install-Package IronOCR.Languages.Thai 程式碼範例 這段 C# 程式碼範例從圖像或 PDF 文件中讀取泰語字母文字。 // Ensure you have installed the IronOCR.Languages.Thai package via NuGet. // Import the IronOcr namespace to work with IronOCR classes. using IronOcr; class ThaiOcrExample { static void Main() { // Create a new instance of IronTesseract for OCR processing var ocr = new IronTesseract(); // Set the language to Thai for Optical Character Recognition ocr.Language = OcrLanguage.Thai; // Using the 'using' statement ensures that resources are properly disposed. using (var input = new OcrInput(@"images\Thai.png")) { // Perform OCR to read the text from the input image var result = ocr.Read(input); // Retrieve and store all recognized text from the image string allText = result.Text; // Optionally, you can output the text to console or log it as needed System.Console.WriteLine(allText); } } } // Ensure you have installed the IronOCR.Languages.Thai package via NuGet. // Import the IronOcr namespace to work with IronOCR classes. using IronOcr; class ThaiOcrExample { static void Main() { // Create a new instance of IronTesseract for OCR processing var ocr = new IronTesseract(); // Set the language to Thai for Optical Character Recognition ocr.Language = OcrLanguage.Thai; // Using the 'using' statement ensures that resources are properly disposed. using (var input = new OcrInput(@"images\Thai.png")) { // Perform OCR to read the text from the input image var result = ocr.Read(input); // Retrieve and store all recognized text from the image string allText = result.Text; // Optionally, you can output the text to console or log it as needed System.Console.WriteLine(allText); } } } ' Ensure you have installed the IronOCR.Languages.Thai package via NuGet. ' Import the IronOcr namespace to work with IronOCR classes. Imports IronOcr Friend Class ThaiOcrExample Shared Sub Main() ' Create a new instance of IronTesseract for OCR processing Dim ocr = New IronTesseract() ' Set the language to Thai for Optical Character Recognition ocr.Language = OcrLanguage.Thai ' Using the 'using' statement ensures that resources are properly disposed. Using input = New OcrInput("images\Thai.png") ' Perform OCR to read the text from the input image Dim result = ocr.Read(input) ' Retrieve and store all recognized text from the image Dim allText As String = result.Text ' Optionally, you can output the text to console or log it as needed System.Console.WriteLine(allText) End Using End Sub End Class $vbLabelText $csharpLabel 在這個例子中,我們從位於images夾中的名為Thai.png圖像中讀取泰文文字。 請務必將檔案路徑替換為您實際的圖片位置。 OCR 語言設定為泰語,使用OcrLanguage.Thai指定要辨識的泰語語言套件。