Turkish OCR in C# and .NET
Curtis Chau
Updated: 2026年4月23日
本文档的其他版本:
IronOCR 是一个 C# 软件组件,允许 .NET 程序员从图像和 PDF 文档中读取 126 种语言(包括土耳其语)的文本。
它是 Tesseract 的一个高级分支,专为 .NET 开发人员构建,在速度和准确性方面通常优于其他 Tesseract 引擎。
IronOcr.Languages.Turkish 的内容
此软件包包含 46 种适用于 .NET 的 OCR 语言:
- 土耳其语
- 土耳其语Best
- 土耳其语Fast
下载
土耳其语语言包[土耳其语]
安装
第一步是使用以下 NuGet 包管理器命令在您的 .NET 项目中安装土耳其语OCR 包。
代码示例
此 C# 代码示例演示了如何从图像或 PDF 文档中读取土耳其语文本。
// Import the IronOcr namespace
using IronOcr;
class OCRExample
{
static void Main()
{
// Create a new IronTesseract object
var Ocr = new IronTesseract();
// Set the OCR language to Turkish
Ocr.Language = OcrLanguage.Turkish;
// Define the input using a path to the image or PDF file
using (var Input = new OcrInput(@"images\Turkish.png"))
{
// Perform the OCR reading operation
var Result = Ocr.Read(Input);
// Retrieve the text from the OCR result
var AllText = Result.Text;
// Print the extracted text to the console
Console.WriteLine(AllText);
}
}
}' Import the IronOcr namespace
Imports IronOcr
Class OCRExample
Shared Sub Main()
' Create a new IronTesseract object
Dim Ocr As New IronTesseract()
' Set the OCR language to Turkish
Ocr.Language = OcrLanguage.Turkish
' Define the input using a path to the image or PDF file
Using Input As New OcrInput("images\Turkish.png")
' Perform the OCR reading operation
Dim Result = Ocr.Read(Input)
' Retrieve the text from the OCR result
Dim AllText = Result.Text
' Print the extracted text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class这段代码使用 IronOCR 设置 OCR 流程,从输入图像中读取土耳其语文本。 然后,它将提取的文本打印到控制台。

技术作家
Curtis Chau 拥有卡尔顿大学的计算机科学学士学位,专注于前端开发,精通 Node.js、TypeScript、JavaScript 和 React。他热衷于打造直观且美观的用户界面,喜欢使用现代框架并创建结构良好、视觉吸引力强的手册。
...
阅读更多