C# 和 .NET 中的亚美尼亚语 OCR
This article was translated from English: Does it need improvement?
TranslatedView the article in English
Other versions of this document:
IronOCR 是一个 C# 软件组件,允许 .NET 程序员从图像和 PDF 文档中读取 126 种语言(包括亚美尼亚语)的文本。
它是 Tesseract 的一个高级分支,专为 .NET 开发人员构建,在速度和准确性方面通常优于其他 Tesseract 引擎。
IronOcr.Languages.Armenian 的内容
此软件包包含几种专门用于 .NET 的亚美尼亚语 OCR 语言:
- 亚美尼亚字母
- 亚美尼亚字母表最佳
- 亚美尼亚字母速成
- 亚美尼亚语
- ArmenianBest
- 亚美尼亚快报
下载
亚美尼亚语语言包[亚美尼亚语]
安装
我们首先需要做的就是将我们的亚美尼亚语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);
}
}
}' Ensure the necessary NuGet package is installed.
' PM> Install-Package IronOCR.Languages.Armenian
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Initialize the Tesseract OCR engine
Dim 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 Input = 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 Class$vbLabelText $csharpLabel





