Armenian 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.Languages.Armenian的內容

此套件包含幾種針對.NET的亞美尼亞文OCR語言:

  • ArmenianAlphabet
  • ArmenianAlphabetBest
  • ArmenianAlphabetFast
  • Armenian
  • ArmenianBest
  • ArmenianFast

下載

亞美尼亞語言包 [Հայերեն]

安裝

我們需要做的第一件事是將亞美尼亞文OCR套件安裝到您的.NET專案中。

Install-Package IronOcr.Languages.Armenian

程式範例

這個C#程式碼範例會從圖片或PDF文件中讀取亞美尼亞文字。

// Ensure the necessary NuGet package is installed.
// PM> Install-Package IronOcr.Languages.Armenian

using IronOcr;

class Program
{
    static void Main()
    {
        // Initialize the Tesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the language of the OCR to Armenian
        Ocr.Language = OcrLanguage.Armenian;

        // Create an OCR input object with the path to the image
        using (var Input = new OcrInput(@"images\Armenian.png"))
        {
            // Perform OCR on the input image
            var Result = Ocr.Read(Input);

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

            // Output the result to the console or any other desired operation
            Console.WriteLine(AllText);
        }
    }
}
// Ensure the necessary NuGet package is installed.
// PM> Install-Package IronOcr.Languages.Armenian

using IronOcr;

class Program
{
    static void Main()
    {
        // Initialize the Tesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the language of the OCR to Armenian
        Ocr.Language = OcrLanguage.Armenian;

        // Create an OCR input object with the path to the image
        using (var Input = new OcrInput(@"images\Armenian.png"))
        {
            // Perform OCR on the input image
            var Result = Ocr.Read(Input);

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

            // Output the result to the console or any other desired operation
            Console.WriteLine(AllText);
        }
    }
}
Imports IronOcr

Module Program
    Sub Main()
        ' Initialize the Tesseract OCR engine
        Dim Ocr As New IronTesseract()

        ' Set the language of the OCR to Armenian
        Ocr.Language = OcrLanguage.Armenian

        ' Create an OCR input object with the path to the image
        Using Input As New OcrInput("images\Armenian.png")
            ' Perform OCR on the input image
            Dim Result = Ocr.Read(Input)

            ' Extract all the text from the OCR result
            Dim AllText = Result.Text

            ' Output the result to the console or any other desired operation
            Console.WriteLine(AllText)
        End Using
    End Sub
End Module
$vbLabelText   $csharpLabel