C# 和 .NET 中的爱沙尼亚语 OCR
Curtis Chau
更新: 2026年8月2日
本文档的其他版本:
IronOCR 是一个 C# 软件组件,允许 .NET 开发人员从图像和 PDF 文档中读取 126 种语言的文本,包括爱沙尼亚语。 它是 Tesseract 的一个高级分支,专为 .NET 开发人员构建,在速度和准确性方面通常优于其他 Tesseract 引擎。
IronOcr.Languages.Estonian 的内容
此软件包包含以下适用于 .NET 的 OCR 语言:
- Estonian
- EstonianBest
- EstonianFast
下载
爱沙尼亚语语言包[爱沙尼亚语]
安装
我们首先需要做的就是将我们的爱沙尼亚语OCR 包安装到您的 .NET 项目中。
代码示例
这段 C# 代码示例从图像或 PDF 文档中读取爱沙尼亚语文本。
// Import the IronOcr namespace
using IronOcr;
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the OCR language to Estonian
Ocr.Language = OcrLanguage.Estonian;
// Load the image or PDF from which text needs to be extracted
using (var Input = new OcrInput(@"images\Estonian.png"))
{
// Perform OCR to read text from the specified input
var Result = Ocr.Read(Input);
// Extract all the recognized text from the OCR result
var AllText = Result.Text;
}' Import the IronOcr namespace
Imports IronOcr
' Create a new instance of the IronTesseract class
Dim Ocr As New IronTesseract()
' Set the OCR language to Estonian
Ocr.Language = OcrLanguage.Estonian
' Load the image or PDF from which text needs to be extracted
Using Input As New OcrInput("images\Estonian.png")
' Perform OCR to read text from the specified input
Dim Result = Ocr.Read(Input)
' Extract all the recognized text from the OCR result
Dim AllText As String = Result.Text
End Using' Import the IronOcr namespace
Imports IronOcr
' Create a new instance of the IronTesseract class
Dim Ocr As New IronTesseract()
' Set the OCR language to Estonian
Ocr.Language = OcrLanguage.Estonian
' Load the image or PDF from which text needs to be extracted
Using Input As New OcrInput("images\Estonian.png")
' Perform OCR to read text from the specified input
Dim Result = Ocr.Read(Input)
' Extract all the recognized text from the OCR result
Dim AllText As String = Result.Text
End Using代码说明:
- IronTesseract: 这是IronOCR提供的一个主要类,用于执行OCR操作。
- Ocr.Language: 通过设置此属性,我们定义在OCR过程中应该使用的语言。 这里设置的是爱沙尼亚语。
- OcrInput: 这用于指定我们想要读取的图像或PDF文档。 它以文件路径作为输入。
Ocr.Read(Input): 此方法处理指定的输入并对其执行OCR。- Result.Text: 此属性包含从图像或PDF文档中成功识别和提取的所有文本。
Curtis Chau 拥有卡尔顿大学的计算机科学学士学位,专注于前端开发,精通 Node.js、TypeScript、JavaScript 和 React。他热衷于打造直观且美观的用户界面,喜欢使用现代框架并创建结构良好、视觉吸引力强的手册。