IronOCR 語言 拉脫維亞語 使用 C# 和 .NET 進行拉脫維亞語 OCR 識別 Curtis Chau 更新:2025年10月27日 下載 IronOCR NuGet 下載 DLL 下載 Windows 安裝程式 開始免費試用 法學碩士副本 法學碩士副本 將頁面複製為 Markdown 格式,用於 LLMs 在 ChatGPT 中打開 請向 ChatGPT 諮詢此頁面 在雙子座打開 請向 Gemini 詢問此頁面 在 Grok 中打開 向 Grok 詢問此頁面 打開困惑 向 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.Latvian 的內容 此軟體包包含 46 種適用於 .NET 的 OCR 語言: 拉脫維亞語 LatvianBest LatvianFast 下載 拉脫維亞語語言包[拉脫維亞語] 下載為Zip 檔案 使用NuGet安裝 安裝 首先,你需要將拉脫維亞語OCR 套件安裝到你的 .NET 專案中。 Install-Package IronOCR.Languages.Latvian 程式碼範例 這段 C# 程式碼範例從圖像或 PDF 文件中讀取拉脫維亞文本。 using IronOcr; class LatvianOCRExample { static void Main() { // Create an instance of IronTesseract for OCR var Ocr = new IronTesseract(); // Set the OCR language to Latvian Ocr.Language = OcrLanguage.Latvian; // Define the input image file path using (var Input = new OcrInput(@"images\Latvian.png")) { // Perform OCR on the input image var Result = Ocr.Read(Input); // Extract all recognized text from the OCR result var AllText = Result.Text; // Output the recognized text to the console Console.WriteLine(AllText); } } } using IronOcr; class LatvianOCRExample { static void Main() { // Create an instance of IronTesseract for OCR var Ocr = new IronTesseract(); // Set the OCR language to Latvian Ocr.Language = OcrLanguage.Latvian; // Define the input image file path using (var Input = new OcrInput(@"images\Latvian.png")) { // Perform OCR on the input image var Result = Ocr.Read(Input); // Extract all recognized text from the OCR result var AllText = Result.Text; // Output the recognized text to the console Console.WriteLine(AllText); } } } Imports IronOcr Friend Class LatvianOCRExample Shared Sub Main() ' Create an instance of IronTesseract for OCR Dim Ocr = New IronTesseract() ' Set the OCR language to Latvian Ocr.Language = OcrLanguage.Latvian ' Define the input image file path Using Input = New OcrInput("images\Latvian.png") ' Perform OCR on the input image Dim Result = Ocr.Read(Input) ' Extract all recognized text from the OCR result Dim AllText = Result.Text ' Output the recognized text to the console Console.WriteLine(AllText) End Using End Sub End Class $vbLabelText $csharpLabel 說明 IronOcr 命名空間:範例首先匯入IronOcr命名空間,這是存取 OCR 功能所必需的。 IronTesseract 實例:建立IronTesseract物件( Ocr )是為了處理影像讀取和文字擷取。 -語言配置:透過設定Ocr.Language屬性,將 OCR 過程配置為讀取拉脫維亞語文字。 OcrInput 物件:建立一個OcrInput對象,引用要處理的映像檔。 -讀取圖像:呼叫Ocr實例的Read方法來處理圖像並提取文本,並將文本儲存在Result變數中。 -結果擷取:透過Result.Text存取 OCR 結果,並將其儲存在AllText中以供進一步使用或顯示。 -控制台輸出:辨識出的拉脫維亞文字會印到控制台上,從而提供文字擷取的視覺確認。