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 開發人員從 126 種語言(包括信德語)的圖片和 PDF 文件中讀取文字。 這是 Tesseract 的進階分支版本,專為 .NET 開發人員打造,無論在速度或準確度方面,其表現均經常優於其他 Tesseract 引擎。

IronOcr.Languages.Sindhi 的內容

此套件包含 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.
}
' Ensure the IronOCR package and Sindhi language pack are installed
Imports IronOcr

Private Ocr = New IronTesseract With {.Language = OcrLanguage.Sindhi}

' Open an image or PDF document for OCR processing
Using Input = New OcrInput("images\Sindhi.png")
	' Perform OCR and get the results
	Dim Result = Ocr.Read(Input)

	' Extract the recognized text
	Dim AllText = Result.Text

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

在此程式碼範例中:

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