Yoruba OCR in C# and .NET

Curtis Chau
Curtis Chau
Updated: 2026年5月9日
此文件的其他版本:

IronOCR 是一個 C# 的軟體組件,允許 .NET 開發者從圖像和 PDF 文件中讀取 126 種語言的文字,包括 Yoruba。 它是 Tesseract 的高級分支,專為 .NET 開發者打造,並且在速度和準確性上經常超越其他 Tesseract 引擎。

IronOcr.Languages.Yoruba 的內容

此套件包含43種適用於.NET的OCR語言:

  • Yoruba
  • YorubaBest
  • YorubaFast

下載

Yoruba 語言包 [Yorùbá]

安裝

第一個任務是將 Yoruba OCR 套件安裝到您的 .NET 專案中。

PM > Install-Package IronOcr.Languages.Yoruba

程式碼範例

這個 C# 範例程式碼從圖像或 PDF 文件中讀取 Yoruba 文字。

// Remember to install the package first:
// PM> Install-Package IronOcr.Languages.Yoruba

using IronOcr;

class Program
{
    static void Main()
    {
        // Create a new instance of the IronTesseract OCR engine
        var Ocr = new IronTesseract();
        
        // Set the OCR language to Yoruba
        Ocr.Language = OcrLanguage.Yoruba;

        // Specify the image or PDF file to read
        using (var Input = new OcrInput(@"images\Yoruba.png"))
        {
            // Perform OCR on the input file
            var Result = Ocr.Read(Input);
            
            // Extract all recognized text
            var AllText = Result.Text;
            
            // Output the recognized text
            Console.WriteLine("Recognized Text: ");
            Console.WriteLine(AllText);
        }
    }
}

程式碼中的註釋解釋每個步驟,從設置語言到提取和列印識別出的文字。 此範例專注於使用 IronOCR 讀取 Yoruba 文字,方法是指定 Yoruba 語言並處理圖像或 PDF 文件。

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

閱讀更多

準備開始了嗎?

Nuget Downloads 6,357,159版本:2026.11剛剛發布