Tajik 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 tadjik.
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.Tajik
Ce package contient 40 langues OCR for .NET :
- Tadjik
- TajikBest
- TajikFast
Télécharger
Pack de langue tadjike [tadjik]
Installation
La première chose à faire est d'installer notre package OCR tadjik sur votre projet .NET.
Install-Package IronOcr.Languages.Tajik
Exemple de code
Cet exemple de code C# lit du texte tadjik à partir d'une image ou d'un document 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
- Créez une instance de
IronTesseractpour utiliser les fonctionnalités OCR. - Définissez la propriété de langue sur
OcrLanguage.Tajikpour spécifier que l'OCR doit traiter en langue tadjike. - Charger l'image d'entrée à partir de laquelle le texte doit être extrait.
Ocr.ReadLa méthode traite l'image et renvoie le résultat contenant le texte extrait.- Accédez à la propriété
Textdu résultat pour obtenir tout le texte détecté dans l'image.

