OCR tayiko en C# y .NET
Other versions of this document:
IronOCR es un componente de software en C# que permite a los desarrolladores de .NET leer texto de imágenes y documentos PDF en 126 idiomas, incluido el tayiko.
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.Tajik
Este paquete contiene 40 idiomas OCR para .NET:
- Tayiko
- TayikoBest
- TayikoFast
Descargar
Paquete de Idioma Tayiko [тоҷикӣ]
Instalación
Lo primero que tenemos que hacer es instalar nuestro paquete OCR Tayiko en su proyecto .NET.
Install-Package IronOCR.Languages.Tajik
Ejemplo de código
Este ejemplo de código en C# lee texto en tayiko desde una imagen o documento PDF.
// Import the IronOcr namespace to use its functionality
using IronOcr;
class Program
{
static void Main()
{
// Create an instance of IronTesseract engine
var Ocr = new IronTesseract();
// Specify the language to use for OCR as Tajik
Ocr.Language = OcrLanguage.Tajik;
// Load the image file where the OCR is to be performed
using (var Input = new OcrInput(@"images\Tajik.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract the text from the OCR result
var AllText = Result.Text;
// Output the text to the console
Console.WriteLine(AllText);
}
}
}// Import the IronOcr namespace to use its functionality
using IronOcr;
class Program
{
static void Main()
{
// Create an instance of IronTesseract engine
var Ocr = new IronTesseract();
// Specify the language to use for OCR as Tajik
Ocr.Language = OcrLanguage.Tajik;
// Load the image file where the OCR is to be performed
using (var Input = new OcrInput(@"images\Tajik.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract the text from the OCR result
var AllText = Result.Text;
// Output the text to the console
Console.WriteLine(AllText);
}
}
}' Import the IronOcr namespace to use its functionality
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create an instance of IronTesseract engine
Dim Ocr = New IronTesseract()
' Specify the language to use for OCR as Tajik
Ocr.Language = OcrLanguage.Tajik
' Load the image file where the OCR is to be performed
Using Input = New OcrInput("images\Tajik.png")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Extract the text from the OCR result
Dim AllText = Result.Text
' Output the text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class- Cree una instancia de
IronTesseractpara usar las funcionalidades de OCR. - Configure la propiedad de idioma en
OcrLanguage.Tajikpara especificar que el OCR debe procesarse en el idioma tayiko. - Cargue la imagen de entrada de la que se necesita extraer texto.
- El método
Ocr.Readprocesa la imagen y devuelve el resultado que contiene el texto extraído. - Acceda a la propiedad
Textdel resultado para obtener todo el texto detectado en la imagen.





