Financial OCR in C# and .NET
IronOCR es un componente de software en C# que permite a los programadores .NET leer texto de imágenes y documentos PDF en 126 idiomas, incluyendo el Financiero.
Es una rama avanzada de Tesseract, construida exclusivamente para desarrolladores de .NET y supera regularmente a otros motores de Tesseract tanto en velocidad como en precisión.
Contenido de IronOcr.Languages.Financial
Este paquete contiene 16 idiomas OCR for .NET:
- Financiero
Descargar
Paquete de idioma Financiero [Financiero]
Instalación
Lo primero que tenemos que hacer es instalar nuestro paquete OCR Financiero en su proyecto .NET.
Install-Package IronOcr.Languages.Financial
Ejemplo de código
Este ejemplo de código C# lee texto financiero de una imagen o 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
Explicación:
- Uso de IronOcr: Este espacio de nombres incluye todas las clases necesarias para el proceso OCR.
- Clase IronTesseract: Esta es la clase principal que permite tareas OCR.
- Configuración de idioma: configurar el idioma en
Financialpermite que el motor de OCR reconozca la terminología financiera. - Clase OcrInput: Toma una ruta de archivo que especifica el archivo de imagen o PDF a procesar.
- Método de lectura: se ejecuta en
Ocr.Read(Input), procesa la imagen para recuperar el texto según la entrada proporcionada y la configuración de idioma. - Result.Text: Almacena el texto reconocido de la imagen o PDF.

