Gujarati 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的內容。語言。古吉拉特語

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

  • 古吉拉特語
  • GujaratiBest
  • GujaratiFast
  • 古吉拉特字母
  • GujaratiAlphabetBest
  • GujaratiAlphabetFast

下載

古吉拉特語語言包[ગજરાતી]

安裝

我們首先需要做的是將我們的古吉拉特語OCR 套件安裝到您的.NET專案中。

Install-Package IronOcr.Languages.Gujarati

程式碼範例

此 C# 程式碼範例從圖像或 PDF 文件中讀取古吉拉特語文字。

// Import the IronOcr namespace to access OCR functionality
using IronOcr;

// Create an instance of the IronTesseract class to handle the OCR process
var Ocr = new IronTesseract();

// Set the language to Gujarati
Ocr.Language = OcrLanguage.Gujarati;

// Use the OcrInput class to provide the path to the image or PDF containing Gujarati text
using (var Input = new OcrInput(@"images\Gujarati.png"))
{
    // Perform OCR on the input document and obtain the result
    var Result = Ocr.Read(Input);

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

    // Display or use the extracted text as needed
    Console.WriteLine(AllText);
}
// Import the IronOcr namespace to access OCR functionality
using IronOcr;

// Create an instance of the IronTesseract class to handle the OCR process
var Ocr = new IronTesseract();

// Set the language to Gujarati
Ocr.Language = OcrLanguage.Gujarati;

// Use the OcrInput class to provide the path to the image or PDF containing Gujarati text
using (var Input = new OcrInput(@"images\Gujarati.png"))
{
    // Perform OCR on the input document and obtain the result
    var Result = Ocr.Read(Input);

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

    // Display or use the extracted text as needed
    Console.WriteLine(AllText);
}
$vbLabelText   $csharpLabel