Lithuanian OCR in C# and .NET
Autres versions de ce document :
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 lituanien.
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.Lituanien
Ce package contient 55 langues OCR for .NET :
- Lituanien
- Le meilleur lituanien
- LituanienFast
Télécharger
Pack de langue lituanienne [lituanien]
Installation
La première chose à faire est d'installer notre package OCR lituanien sur votre projet .NET.
Install-Package IronOcr.Languages.Lithuanian
Exemple de code
Cet exemple de code C# lit du texte lituanien à partir d'une image ou d'un document PDF.
// Include the IronOcr namespace to use OCR features
using IronOcr;
class Program
{
static void Main(string[] args)
{
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the OCR language to Lithuanian
Ocr.Language = OcrLanguage.Lithuanian;
// Use a using statement to ensure that the OcrInput object is disposed of properly
using (var Input = new OcrInput(@"images\Lithuanian.png"))
{
// Perform OCR on the input image and store the result
var Result = Ocr.Read(Input);
// Extract the text from the OCR result
var AllText = Result.Text;
// For demonstration purposes, output the extracted text to the console
Console.WriteLine(AllText);
}
}
}
// Include the IronOcr namespace to use OCR features
using IronOcr;
class Program
{
static void Main(string[] args)
{
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the OCR language to Lithuanian
Ocr.Language = OcrLanguage.Lithuanian;
// Use a using statement to ensure that the OcrInput object is disposed of properly
using (var Input = new OcrInput(@"images\Lithuanian.png"))
{
// Perform OCR on the input image and store the result
var Result = Ocr.Read(Input);
// Extract the text from the OCR result
var AllText = Result.Text;
// For demonstration purposes, output the extracted text to the console
Console.WriteLine(AllText);
}
}
}
' Include the IronOcr namespace to use OCR features
Imports IronOcr
Friend Class Program
Shared Sub Main(ByVal args() As String)
' Create a new instance of the IronTesseract class
Dim Ocr = New IronTesseract()
' Set the OCR language to Lithuanian
Ocr.Language = OcrLanguage.Lithuanian
' Use a using statement to ensure that the OcrInput object is disposed of properly
Using Input = New OcrInput("images\Lithuanian.png")
' Perform OCR on the input image and store the result
Dim Result = Ocr.Read(Input)
' Extract the text from the OCR result
Dim AllText = Result.Text
' For demonstration purposes, output the extracted text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class

