Financial OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English

Mais 126 idiomas

O IronOCR é um componente de software C# que permite aos programadores .NET ler texto de imagens e documentos PDF em 126 idiomas, incluindo idiomas financeiros.

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.Financeiro

Este pacote contém 16 linguagens de OCR for .NET:

  • Financeiro

Baixar

Pacote de Linguagem Financeira [Financeiro]

Instalação

A primeira coisa que precisamos fazer é instalar nosso pacote de OCR financeiro em seu projeto .NET .

Install-Package IronOcr.Languages.Financial

Exemplo de código

Este exemplo de código C# lê texto financeiro de uma imagem ou documento PDF.

// Import the IronOcr namespace
using IronOcr;

// Instantiate the IronTesseract OCR engine
var Ocr = new IronTesseract();

// Set the OCR language to Financial
Ocr.Language = OcrLanguage.Financial;

// Create an OCR input object, specifying the path to the image or PDF
using (var Input = new OcrInput(@"images\Financial.png"))
{
    // Perform OCR to read text from the input
    var Result = Ocr.Read(Input);

    // Retrieve the extracted text
    var AllText = Result.Text;
}
// Import the IronOcr namespace
using IronOcr;

// Instantiate the IronTesseract OCR engine
var Ocr = new IronTesseract();

// Set the OCR language to Financial
Ocr.Language = OcrLanguage.Financial;

// Create an OCR input object, specifying the path to the image or PDF
using (var Input = new OcrInput(@"images\Financial.png"))
{
    // Perform OCR to read text from the input
    var Result = Ocr.Read(Input);

    // Retrieve the extracted text
    var AllText = Result.Text;
}
' Import the IronOcr namespace
Imports IronOcr

' Instantiate the IronTesseract OCR engine
Private Ocr = New IronTesseract()

' Set the OCR language to Financial
Ocr.Language = OcrLanguage.Financial

' Create an OCR input object, specifying the path to the image or PDF
Using Input = New OcrInput("images\Financial.png")
	' Perform OCR to read text from the input
	Dim Result = Ocr.Read(Input)

	' Retrieve the extracted text
	Dim AllText = Result.Text
End Using
$vbLabelText   $csharpLabel

Explicação:

  • Usando IronOCR: Este namespace inclui todas as classes necessárias para o processo de OCR.
  • Classe IronTesseract: Esta é a classe principal que permite a realização de tarefas de OCR.
  • Configuração de Idioma: Configurar o idioma para Financial habilita o mecanismo de OCR para reconhecer a terminologia financeira.
  • Classe OcrInput: Ela recebe o caminho de um arquivo que especifica a imagem ou o arquivo PDF a ser processado.
  • Método de Leitura: Executado em Ocr.Read(Input), processa a imagem para recuperar o texto com base na entrada fornecida e nas configurações de idioma.
  • Result.Text: Armazena o texto reconhecido da imagem ou do PDF.