C# 和 .NET 中的马来语 OCR
This article was translated from English: Does it need improvement?
TranslatedView the article in English
IronOCR 是一个 C# 软件组件,允许 .NET 程序员从图像和 PDF 文档中读取 126 种语言(包括马来语)的文本。
它是 Tesseract 的一个高级分支,专为 .NET 开发人员构建,在速度和准确性方面通常优于其他 Tesseract 引擎。
IronOcr.Languages.Malay 的内容
此软件包包含 40 种适用于 .NET 的 OCR 语言:
马来语 马来语Best 马来语Fast
下载
马来语语言包[马来语]
安装
IronOcr.Languages.Malayalam 的内容
Install-Package IronOCR.Languages.Malay
代码示例
此 C# 代码示例从图像或 PDF 文档中读取马来文本。
// This example demonstrates how to read Malay text using IronOcr.
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the OCR language to Malay
Ocr.Language = OcrLanguage.Malay;
// Use a using statement to ensure the OcrInput is properly disposed of
using (var Input = new OcrInput(@"images\Malay.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract and store the recognized text from the OCR result
string AllText = Result.Text;
// Output the recognized text (optional)
Console.WriteLine(AllText);
}
}
}// This example demonstrates how to read Malay text using IronOcr.
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the OCR language to Malay
Ocr.Language = OcrLanguage.Malay;
// Use a using statement to ensure the OcrInput is properly disposed of
using (var Input = new OcrInput(@"images\Malay.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract and store the recognized text from the OCR result
string AllText = Result.Text;
// Output the recognized text (optional)
Console.WriteLine(AllText);
}
}
}' This example demonstrates how to read Malay text using IronOcr.
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create a new instance of the IronTesseract class
Dim Ocr = New IronTesseract()
' Set the OCR language to Malay
Ocr.Language = OcrLanguage.Malay
' Use a using statement to ensure the OcrInput is properly disposed of
Using Input = New OcrInput("images\Malay.png")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Extract and store the recognized text from the OCR result
Dim AllText As String = Result.Text
' Output the recognized text (optional)
Console.WriteLine(AllText)
End Using
End Sub
End Class$vbLabelText $csharpLabel





