Tajik OCR in C# and .NET
Outras versões deste documento:
O IronOCR é um componente de software C# que permite aos programadores .NET ler texto de imagens e documentos PDF em 126 idiomas, incluindo o tajique.
Trata-se de uma versão avançada do Tesseract, criada exclusivamente para desenvolvedores .NET e que supera regularmente outros mecanismos do Tesseract em termos de velocidade e precisão.
Conteúdo de IronOcr.Languages.Tajik
Este pacote contém 40 idiomas de OCR for .NET:
- Tajique
- TajikMelhor
- TajikFast
Baixar
Pacote de idioma tadjique [тоҷикӣ]
Instalação
A primeira coisa que precisamos fazer é instalar nosso pacote OCR para tajique em seu projeto .NET.
Install-Package IronOcr.Languages.Tajik
Exemplo de código
Este exemplo de código C# lê texto em tajique de uma imagem ou 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
- Crie uma instância de
IronTesseractpara usar as funcionalidades de OCR. - Defina a propriedade de idioma para
OcrLanguage.Tajikpara especificar que o OCR deve processar no idioma Tajique. - Carregar a imagem de entrada da qual o texto precisa ser extraído.
- O método
Ocr.Readprocessa a imagem e retorna o resultado contendo o texto extraído. - Acesse a propriedade
Textdo resultado para obter todo o texto detectado na imagem.

