Ancient Greek OCR in C#

This article was translated from English: Does it need improvement?
Translated
View the article in English

I26 更多語言

IronOCR 是一個 C# 軟體元件,允許 .NET 程式員從圖像和 PDF 文件中讀取 126 種語言的文本,包括古希臘文。

它是一個專為 .NET 開發者設計的 Tesseract 高級分支,在速度和準確性方面經常優於其他 Tesseract 引擎。

IronOcr.Languages.AncientGreek 的內容

此套件包含 61 種 .NET 的 OCR 語言:

  • AncientGreek
  • AncientGreekBest
  • AncientGreekFast

下載

古希臘語言包 style='white-space:default'>[Ἑλληνική]

安裝

我們首先要做的是在您的 .NET 專案中安裝 古希臘文 OCR 套件。

Install-Package IronOCR.Languages.AncientGreek

代碼示例

此 C# 代碼範例從圖像或 PDF 文件中讀取古希臘文文本。

// To use the IronOCR library, ensure you have the Ancient Greek language pack installed.
// Import the IronOcr namespace
using IronOcr;

var Ocr = new IronTesseract();

// Set the OCR language to Ancient Greek
Ocr.Language = OcrLanguage.AncientGreek;

// Load the image or PDF document to extract text from
using (var Input = new OcrInput(@"images\AncientGreek.png"))
{
    // Perform OCR to read text from the input
    var Result = Ocr.Read(Input);

    // Retrieve the text found in the image
    var AllText = Result.Text;

    // Display the extracted text
    Console.WriteLine(AllText);
}
// To use the IronOCR library, ensure you have the Ancient Greek language pack installed.
// Import the IronOcr namespace
using IronOcr;

var Ocr = new IronTesseract();

// Set the OCR language to Ancient Greek
Ocr.Language = OcrLanguage.AncientGreek;

// Load the image or PDF document to extract text from
using (var Input = new OcrInput(@"images\AncientGreek.png"))
{
    // Perform OCR to read text from the input
    var Result = Ocr.Read(Input);

    // Retrieve the text found in the image
    var AllText = Result.Text;

    // Display the extracted text
    Console.WriteLine(AllText);
}
' To use the IronOCR library, ensure you have the Ancient Greek language pack installed.
' Import the IronOcr namespace
Imports IronOcr

Private Ocr = New IronTesseract()

' Set the OCR language to Ancient Greek
Ocr.Language = OcrLanguage.AncientGreek

' Load the image or PDF document to extract text from
Using Input = New OcrInput("images\AncientGreek.png")
	' Perform OCR to read text from the input
	Dim Result = Ocr.Read(Input)

	' Retrieve the text found in the image
	Dim AllText = Result.Text

	' Display the extracted text
	Console.WriteLine(AllText)
End Using
$vbLabelText   $csharpLabel