Irish OCR in C# and .NET
Outras versões deste documento:
IronOCR é um componente de software C# permitindo que programadores .NET leiam texto de imagens e documentos PDF em 126 idiomas, incluindo o Irlandês.
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.Languages.Irish
Este pacote contém 40 idiomas de OCR for .NET:
- Irlandês
- IrishBest
- IrishFast
Baixar
Pacote de Idioma Irlandês [Gaeilge]
Instalação
A primeira coisa que precisamos fazer é instalar nosso pacote OCR Irlandês em seu projeto .NET.
Install-Package IronOcr.Languages.Irish
Exemplo de código
Este exemplo de código C# lê texto em irlandês de uma imagem ou documento PDF.
// Install the IronOCR Irish language package via NuGet:
// PM> Install-Package IronOcr.Languages.Irish
using IronOcr;
class IrishOcrExample
{
static void Main()
{
// Create a new instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Irish for OCR processing
Ocr.Language = OcrLanguage.Irish;
// Using the OCR input, specify the path to the image containing Irish text
using (var Input = new OcrInput(@"images\Irish.png"))
{
// Perform OCR to read the Irish text from the image
var Result = Ocr.Read(Input);
// Get the recognized text as a string from the OCR result
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
// Install the IronOCR Irish language package via NuGet:
// PM> Install-Package IronOcr.Languages.Irish
using IronOcr;
class IrishOcrExample
{
static void Main()
{
// Create a new instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Irish for OCR processing
Ocr.Language = OcrLanguage.Irish;
// Using the OCR input, specify the path to the image containing Irish text
using (var Input = new OcrInput(@"images\Irish.png"))
{
// Perform OCR to read the Irish text from the image
var Result = Ocr.Read(Input);
// Get the recognized text as a string from the OCR result
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
Imports IronOcr
Module IrishOcrExample
Sub Main()
' Create a new instance of the IronTesseract OCR engine
Dim Ocr As New IronTesseract()
' Set the language to Irish for OCR processing
Ocr.Language = OcrLanguage.Irish
' Using the OCR input, specify the path to the image containing Irish text
Using Input As New OcrInput("images\Irish.png")
' Perform OCR to read the Irish text from the image
Dim Result = Ocr.Read(Input)
' Get the recognized text as a string from the OCR result
Dim AllText As String = Result.Text
' Output the recognized text
Console.WriteLine(AllText)
End Using
End Sub
End Module
Neste exemplo, utilizamos a classe IronTesseract da biblioteca IronOCR para realizar OCR em uma imagem contendo texto escrito no idioma irlandês. O objeto OcrInput é usado para carregar a imagem, e o método Ocr.Read processa a imagem para extrair texto. O texto resultante é então armazenado na variável AllText e impresso no console.

