Lithuanian OCR in C# and .NET
Otras versiones de este documento:
IronOCR es un componente de software en C# que permite a los programadores de .NET leer texto de imágenes y documentos PDF en 126 idiomas, incluyendo el lituano.
Es una rama avanzada de Tesseract, construida exclusivamente para desarrolladores de .NET y supera regularmente a otros motores de Tesseract tanto en velocidad como en precisión.
Contenido de IronOcr.Languages.Lithuanian
Este paquete contiene 55 idiomas OCR for .NET:
- Lituano
- LituanoMejor
- LituanoRápido
Descargar
Paquete de idioma lituano [lietuvių kalba]
Instalación
Lo primero que tenemos que hacer es instalar nuestro paquete de OCR Lituano en tu proyecto .NET.
Install-Package IronOcr.Languages.Lithuanian
Ejemplo de código
Este ejemplo de código C# lee texto en lituano de una imagen o documento 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

