Assamese OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English

還有126種語言

IronOCR是一個 C# 軟體元件,允許.NET設計師從圖像和 PDF 文件中讀取 126 種語言(包括阿薩姆語)的文字。

它是 Tesseract 的一個高級分支,專為.NET開發人員構建,在速度和準確性方面通常優於其他 Tesseract 引擎。

IronOCR的內容。語言。阿薩姆語

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

阿薩姆語

  • AssameseBest
  • AssameseFast

下載

阿薩姆語語言包[অসমীযা] 下載為Zip 檔案

安裝

我們首先需要做的就是將我們的阿薩姆語OCR 套件安裝到您的.NET專案中。

Install-Package IronOcr.Languages.Assamese

程式碼範例

這段 C# 程式碼範例從圖像或 PDF 文件中讀取阿薩姆語文字。

// Make sure to install the necessary package:
// PM> Install-Package IronOcr.Languages.Assamese

using IronOcr;

class OCRExample
{
    public void ReadAssameseText()
    {
        // Create an instance of IronTesseract OCR engine
        var Ocr = new IronTesseract();

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

        // Create an OCR input object with the specified image or PDF file
        using (var Input = new OcrInput(@"images\Assamese.png"))
        {
            // Read the text from the input file
            var Result = Ocr.Read(Input);

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

            // Output the recognized text to the console
            Console.WriteLine(AllText);
        }
    }
}
// Make sure to install the necessary package:
// PM> Install-Package IronOcr.Languages.Assamese

using IronOcr;

class OCRExample
{
    public void ReadAssameseText()
    {
        // Create an instance of IronTesseract OCR engine
        var Ocr = new IronTesseract();

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

        // Create an OCR input object with the specified image or PDF file
        using (var Input = new OcrInput(@"images\Assamese.png"))
        {
            // Read the text from the input file
            var Result = Ocr.Read(Input);

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

            // Output the recognized text to the console
            Console.WriteLine(AllText);
        }
    }
}
$vbLabelText   $csharpLabel
  • IronTesseract :這是負責 OCR 操作的主要類別。
  • OcrLanguage.Assamese :指定 OCR 的語言。 在這種情況下,語言設定為阿薩姆語。
  • OcrInput :此類用於載入要從中提取文字的圖像或 PDF。
  • Result.Text :包含從圖像或 PDF 提取的完整文字。