Azerbaijani 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 azerbaijano.
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 do IronOcr.Idiomas.Azerbaijano
Este pacote contém 138 idiomas OCR for .NET:
- Azerbaijano
- AzerbaijanoMelhor
- AzerbaijanoRápido
- AzerbaijanoCirílico
- AzerbaijanoCyrillicMelhor
- AzerbaijanoCyrillicFast
Baixar
Pacote de idiomas do Azerbaijão [azərbaycan dili]
Instalação
A primeira coisa que precisamos fazer é instalar nosso pacote OCR para azerbaijano em seu projeto .NET .
Install-Package IronOcr.Languages.Azerbaijani
Exemplo de código
Este exemplo de código C# lê texto em azerbaijano de uma imagem ou documento PDF.
// Ensure the IronOCR Azerbaijani language package is installed
// PM> Install-Package IronOcr.Languages.Azerbaijani
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of IronTesseract engine
var Ocr = new IronTesseract();
// Specify the language to be Azerbaijani
Ocr.Language = OcrLanguage.Azerbaijani;
// Provide the path to the image file containing Azerbaijani text
using (var Input = new OcrInput(@"images\Azerbaijani.png"))
{
// Process the image to extract text
var Result = Ocr.Read(Input);
// Extracted text is stored in Result.Text
var AllText = Result.Text;
// Output the extracted text
Console.WriteLine(AllText);
}
}
}
// Ensure the IronOCR Azerbaijani language package is installed
// PM> Install-Package IronOcr.Languages.Azerbaijani
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of IronTesseract engine
var Ocr = new IronTesseract();
// Specify the language to be Azerbaijani
Ocr.Language = OcrLanguage.Azerbaijani;
// Provide the path to the image file containing Azerbaijani text
using (var Input = new OcrInput(@"images\Azerbaijani.png"))
{
// Process the image to extract text
var Result = Ocr.Read(Input);
// Extracted text is stored in Result.Text
var AllText = Result.Text;
// Output the extracted text
Console.WriteLine(AllText);
}
}
}
Imports IronOcr
Module Program
Sub Main()
' Create a new instance of IronTesseract engine
Dim Ocr As New IronTesseract()
' Specify the language to be Azerbaijani
Ocr.Language = OcrLanguage.Azerbaijani
' Provide the path to the image file containing Azerbaijani text
Using Input As New OcrInput("images\Azerbaijani.png")
' Process the image to extract text
Dim Result = Ocr.Read(Input)
' Extracted text is stored in Result.Text
Dim AllText = Result.Text
' Output the extracted text
Console.WriteLine(AllText)
End Using
End Sub
End Module
Neste exemplo, inicializamos o objeto IronTesseract e definimos seu idioma como azerbaijano. A instância OcrInput é usada para ler uma imagem a partir do caminho de arquivo especificado. O método Ocr.Read processa a imagem para extrair o texto, que é acessível através da propriedade Result.Text. Isso permite uma saída fácil ou processamento posterior.

