Financial OCR in C# and .NET
IronOCR est un composant logiciel C# permettant aux développeurs .NET de lire du texte à partir d'images et de documents PDF dans 126 langues, y compris des langues financières.
Il s'agit d'une version avancée de Tesseract, conçue exclusivement pour les développeurs .NET et qui surpasse régulièrement les autres moteurs Tesseract en termes de vitesse et de précision.
Sommaire d'IronOcr.Languages.Finance
Ce package contient 16 langues OCR for .NET :
- Financier
Télécharger
Pack linguistique financier [Finance]
Installation
La première chose à faire est d'installer notre package OCR financier sur votre projet .NET.
Install-Package IronOcr.Languages.Financial
Exemple de code
Cet exemple de code C# lit du texte financier à partir d'une image ou d'un document 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
Explication :
- Utilisation d'IronOcr : cet espace de noms inclut toutes les classes nécessaires au processus OCR.
- Classe IronTesseract : Il s'agit de la classe principale permettant les tâches OCR.
- Paramètre de langue : Définir la langue sur
Financialpermet au moteur OCR de reconnaître la terminologie financière. - Classe OcrInput : Elle prend en paramètre un chemin de fichier spécifiant le fichier image ou PDF à traiter.
- Méthode de lecture : Exécutée sur
Ocr.Read(Input), elle traite l'image pour récupérer le texte en fonction des paramètres d'entrée et de langue fournis. - Result.Text : Stocke le texte reconnu à partir de l'image ou du PDF.

