Financial OCR in C# and .NET

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

126 autres langues

IronOCR est un composant logiciel C# permettant aux codeurs .NET de lire du texte à partir d'images et de documents PDF dans 126 langues, y compris Financial.

Il s'agit d'une version avancée de Tesseract, conçue exclusivement pour les développeurs .NET, qui surpasse régulièrement les autres moteurs Tesseract en termes de vitesse et de précision.

Contenu de IronOcr.Languages.Financial

Ce pack contient 16 langues OCR pour .NET :

  • Financier

Télécharger

Pack linguistique financier [Financier]

Installation

La première chose à faire est d'installer notre paquetage OCR Financial dans votre projet .NET.

Install-Package IronOCR.Languages.Financial

Exemple de code

Cet exemple de code C# lit le 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
$vbLabelText   $csharpLabel

Explication:

  • Utilisation d'IronOcr: Cet espace de noms comprend toutes les classes nécessaires au processus d'OCR.
  • Classe IronTesseract: Il s'agit de la classe principale permettant d'effectuer des tâches d'OCR.
  • Configuration de la langue: La configuration de la langue sur Financial permet au moteur OCR de reconnaître la terminologie financière.
  • Classe OcrInput: Elle prend un chemin de fichier qui spécifie l'image ou le fichier PDF à traiter.
  • Méthode de lecture: Exécutée sur Ocr.Read(Input), elle traite l'image pour extraire le texte en fonction des paramètres d'entrée et de langue fournis.
  • Result.Text: Il stocke le texte reconnu à partir de l'image ou du PDF.