Sindhi OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
本文檔的其他版本:

IronOCR是一個 C# 軟體元件,它允許.NET開發人員從圖像和 PDF 文件中讀取 126 種語言(包括信德語)的文字。 它是 Tesseract 的一個高級分支,專為.NET開發人員構建,在速度和準確性方面通常優於其他 Tesseract 引擎。

IronOCR的內容。語言。信德語

此軟體包包含 43 種適用於.NET的 OCR 語言:

  • 信德語
  • 信德語Best
  • 信德語Fast

下載

信德語語言包[सिनधी]

安裝

首先要做的是在您的.NET專案中安裝Sindhi OCR 套件。

Install-Package IronOcr.Languages.Sindhi

程式碼範例

此 C# 程式碼範例從圖像或 PDF 文件中讀取信德語文字。

// Ensure the IronOCR package and Sindhi language pack are installed
using IronOcr;

var Ocr = new IronTesseract
{
    Language = OcrLanguage.Sindhi  // Set the OCR language to Sindhi
};

// Open an image or PDF document for OCR processing
using (var Input = new OcrInput(@"images\Sindhi.png"))
{
    // Perform OCR and get the results
    var Result = Ocr.Read(Input);

    // Extract the recognized text
    var AllText = Result.Text;

    // Optionally, you can do something with the extracted text,
    // such as displaying or saving it to a file.
}
// Ensure the IronOCR package and Sindhi language pack are installed
using IronOcr;

var Ocr = new IronTesseract
{
    Language = OcrLanguage.Sindhi  // Set the OCR language to Sindhi
};

// Open an image or PDF document for OCR processing
using (var Input = new OcrInput(@"images\Sindhi.png"))
{
    // Perform OCR and get the results
    var Result = Ocr.Read(Input);

    // Extract the recognized text
    var AllText = Result.Text;

    // Optionally, you can do something with the extracted text,
    // such as displaying or saving it to a file.
}
$vbLabelText   $csharpLabel

在此程式碼範例中:

  • 我們建立了一個 IronTesseract 實例。
  • 將 OCR 語言設定為信德語。 開啟一個包含信德文本的圖像檔案。
  • 使用 Read 方法對圖像執行 OCR 並提取文字。
  • 提取的文字儲存在 AllText 變數中,以便進一步使用。