Middle English OCR in C# and .NET
IronOCR to komponent oprogramowania C#, ktory pozwala programistom .NET na czytanie tekstu z obrazow i dokumentow PDF w 126 jezykach, w tym w srednioangielskim.
Jest to zaawansowany fork Tesseract, stworzony wyłącznie dla programistów .NET i regularnie przewyższa inne silniki Tesseract zarówno pod względem szybkości, jak i dokładności.
Zawartosc IronOcr.Languages.MiddleEnglish
Ten pakiet zawiera 64 języki OCR dla .NET:
- MiddleEnglish
- MiddleEnglishBest
- MiddleEnglishFast
Pobieranie
Middle English Language Pack [English (1100-1500 AD)]
Instalacja
Pierwsza rzecz, ktora musimy zrobic, to zainstalowac nasz pakiet OCR Srednioangielski w twoim projekcie .NET.
Install-Package IronOcr.Languages.MiddleEnglish
Przyklad kodu
Ten przyklad kodu C# odczytuje tekst srednioangielski z obrazu lub dokumentu PDF.
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Middle English
Ocr.Language = OcrLanguage.MiddleEnglish;
// Define the input source as an image file
using (var Input = new OcrInput(@"images\MiddleEnglish.png"))
{
// Perform OCR to read the text from the input
var Result = Ocr.Read(Input);
// Get all the recognized text
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Middle English
Ocr.Language = OcrLanguage.MiddleEnglish;
// Define the input source as an image file
using (var Input = new OcrInput(@"images\MiddleEnglish.png"))
{
// Perform OCR to read the text from the input
var Result = Ocr.Read(Input);
// Get all the recognized text
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
' Import the IronOcr namespace
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Initialize the IronTesseract OCR engine
Dim Ocr = New IronTesseract()
' Set the language to Middle English
Ocr.Language = OcrLanguage.MiddleEnglish
' Define the input source as an image file
Using Input = New OcrInput("images\MiddleEnglish.png")
' Perform OCR to read the text from the input
Dim Result = Ocr.Read(Input)
' Get all the recognized text
Dim AllText = Result.Text
' Output the recognized text
Console.WriteLine(AllText)
End Using
End Sub
End Class
- Upewnij się, że masz zainstalowany pakiet IronOCR oraz odpowiedni pakiet językowy.
- Ten przyklad inicjalizuje silnik OCR, ustawia go do przetwarzania srednioangielskiego, odczytuje tekst z obrazu wejsciowego i wyprowadza rozpoznany tekst.

