Syriac OCR in C# and .NET
IronOCR est un composant logiciel C# permettant aux développeurs .NET de lire du texte à partir d'images et de documents PDF dans 126 langues, dont le syriaque.
Il s'agit d'une version avancée de Tesseract, conçue exclusivement pour les développeurs .NET et qui surpasse régulièrement les autres moteurs Tesseract en termes de vitesse et de précision.
Contenu de IronOcr.Languages.Syriaque
Ce package contient 108 langues OCR for .NET :
- Syriaque
- SyriaqueBest
- SyriaqueFast
- Alphabet syriaque
- Alphabet syriaqueBest
- Alphabet syriaque rapide
Télécharger
Pack de langue syriaque [Syriaque]
Installation
La première étape consiste à installer le package OCR syriaque dans votre projet .NET.
Install-Package IronOcr.Languages.Syriac
Exemple de code
Cet exemple de code C# lit du texte syriaque à partir d'une image ou d'un document PDF.
// Import the IronOcr library
using IronOcr;
class Program
{
static void Main()
{
// Instantiate the IronTesseract object
var Ocr = new IronTesseract();
// Set the language to Syriac
Ocr.Language = OcrLanguage.Syriac;
// Create an OCR input from an image file
using (var Input = new OcrInput(@"images\Syriac.png"))
{
// Read the image and extract the text
var Result = Ocr.Read(Input);
// Retrieve the full recognized text
var AllText = Result.Text;
// Output the text to the console
Console.WriteLine(AllText);
}
}
}
// Import the IronOcr library
using IronOcr;
class Program
{
static void Main()
{
// Instantiate the IronTesseract object
var Ocr = new IronTesseract();
// Set the language to Syriac
Ocr.Language = OcrLanguage.Syriac;
// Create an OCR input from an image file
using (var Input = new OcrInput(@"images\Syriac.png"))
{
// Read the image and extract the text
var Result = Ocr.Read(Input);
// Retrieve the full recognized text
var AllText = Result.Text;
// Output the text to the console
Console.WriteLine(AllText);
}
}
}
' Import the IronOcr library
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Instantiate the IronTesseract object
Dim Ocr = New IronTesseract()
' Set the language to Syriac
Ocr.Language = OcrLanguage.Syriac
' Create an OCR input from an image file
Using Input = New OcrInput("images\Syriac.png")
' Read the image and extract the text
Dim Result = Ocr.Read(Input)
' Retrieve the full recognized text
Dim AllText = Result.Text
' Output the text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class
Dans cet exemple :
- Nous créons une instance de
IronTesseractpour traiter l'OCR. - Le
Ocr.Languageest défini surSyriacpour assurer une reconnaissance de texte précise pour cette langue. - Nous chargeons une image contenant du texte syriaque dans
OcrInputet la traitons en utilisantOcr.Read. - Le texte reconnu est ensuite stocké dans
Result.Text, qui peut être utilisé ultérieurement dans votre application.

