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.Albanian 的内容
此软件包包含 49 种适用于 .NET 的 OCR 语言:
- 阿尔巴尼亚语
- 阿尔巴尼亚最佳
- 阿尔巴尼亚快报
下载
阿尔巴尼亚语语言包 [gjuha shqipe]
安装
我们首先需要做的是将我们的阿尔巴尼亚语OCR 包安装到您的 .NET 项目中。
Install-Package IronOCR.Languages.Albanian
代码示例
这段 C# 代码示例从图像或 PDF 文档中读取阿尔巴尼亚语文本。
// This example demonstrates how to use IronOCR to extract text from an image using the Albanian language pack.
using IronOcr;
var Ocr = new IronTesseract(); // Create a new instance of the IronTesseract engine.
Ocr.Language = OcrLanguage.Albanian; // Set the OCR language to Albanian.
using (var Input = new OcrInput(@"images\Albanian.png")) // Provide path to the image file.
{
var Result = Ocr.Read(Input); // Perform OCR on the input image.
var AllText = Result.Text; // Extract the recognized text from the OCR result.
// Optionally, use the extracted text for further processing.
}// This example demonstrates how to use IronOCR to extract text from an image using the Albanian language pack.
using IronOcr;
var Ocr = new IronTesseract(); // Create a new instance of the IronTesseract engine.
Ocr.Language = OcrLanguage.Albanian; // Set the OCR language to Albanian.
using (var Input = new OcrInput(@"images\Albanian.png")) // Provide path to the image file.
{
var Result = Ocr.Read(Input); // Perform OCR on the input image.
var AllText = Result.Text; // Extract the recognized text from the OCR result.
// Optionally, use the extracted text for further processing.
}' This example demonstrates how to use IronOCR to extract text from an image using the Albanian language pack.
Imports IronOcr
Private Ocr = New IronTesseract() ' Create a new instance of the IronTesseract engine.
Ocr.Language = OcrLanguage.Albanian ' Set the OCR language to Albanian.
Using Input = New OcrInput("images\Albanian.png") ' Provide path to the image file.
Dim Result = Ocr.Read(Input) ' Perform OCR on the input image.
Dim AllText = Result.Text ' Extract the recognized text from the OCR result.
' Optionally, use the extracted text for further processing.
End Using$vbLabelText $csharpLabel





