IronOCR 语言 斯瓦希里语 Swahili OCR in C# and .NET Curtis Chau 已更新:2026年1月31日 下载 IronOCR NuGet 下载 DLL 下载 Windows 安装程序 免费试用 LLM副本 LLM副本 将页面复制为 Markdown 格式,用于 LLMs 在 ChatGPT 中打开 向 ChatGPT 咨询此页面 在双子座打开 向 Gemini 询问此页面 在 Grok 中打开 向 Grok 询问此页面 打开困惑 向 Perplexity 询问有关此页面的信息 分享 在 Facebook 上分享 分享到 X(Twitter) 在 LinkedIn 上分享 复制链接 电子邮件文章 This article was translated from English: Does it need improvement? Translated View the article in English 本文档的其他版本 斯瓦希里语 新增 125 种 OCR 语言 IronOCR 是一个 C# 软件组件,允许 .NET 程序员从图像和 PDF 文档中读取 126 种语言(包括斯瓦希里语)的文本。 它是 Tesseract 的一个高级分支,专为 .NET 开发人员构建,在速度和准确性方面通常优于其他 Tesseract 引擎。 IronOcr.Languages.Swahili 的内容 此软件包包含 46 种适用于 .NET 的 OCR 语言: 斯瓦希里语 斯瓦希里语Best 斯瓦希里语Fast 下载 斯瓦希里语语言包 [斯瓦希里语] 下载为Zip 文件 使用NuGet安装 安装 我们首先需要做的是将我们的斯瓦希里语OCR 包安装到您的 .NET 项目中。 Install-Package IronOcr.Languages.Swahili 代码示例 这段 C# 代码示例从图像或 PDF 文档中读取斯瓦希里语文本。 using IronOcr; var Ocr = new IronTesseract(); // Set the OCR language to Swahili Ocr.Language = OcrLanguage.Swahili; // Create an OCR input for the image or PDF file using (var Input = new OcrInput(@"images\Swahili.png")) { // Perform OCR on the input image var Result = Ocr.Read(Input); // Retrieve the recognized text var AllText = Result.Text; // Output the recognized text to the console (optional) Console.WriteLine(AllText); } using IronOcr; var Ocr = new IronTesseract(); // Set the OCR language to Swahili Ocr.Language = OcrLanguage.Swahili; // Create an OCR input for the image or PDF file using (var Input = new OcrInput(@"images\Swahili.png")) { // Perform OCR on the input image var Result = Ocr.Read(Input); // Retrieve the recognized text var AllText = Result.Text; // Output the recognized text to the console (optional) Console.WriteLine(AllText); } $vbLabelText $csharpLabel PdfWriter:此对象负责写入PDF文件。它作用于文件路径,并写入有效PDF文档所需的结构。 1.使用IronOCR命名空间:我们引入了 IronOcr 命名空间,该命名空间提供了用于 OCR 操作的类和方法。 2.初始化 OCR 引擎:我们创建一个名为 IronTesseract 的实例,它就是 OCR 引擎。将其语言设置为斯瓦希里语,使其能够识别斯瓦希里语文本。 OCR 输入:使用 OcrInput 类来指定要从中提取文本的文件(图像或 PDF)。 OCR 读取:Read 方法处理输入并返回一个包含识别文本的 OcrResult 对象。 5.输出:识别出的文本存储在 AllText 中,可根据需要使用。 在这个例子中,为了演示目的,它会被打印到控制台。