Skip to main content

French banking intent and entities extraction package

Project description

banking_nlp 2.0.0

Version Python spaCy French NLP Banking Packaged Models

banking_nlp est un package Python prêt à l’emploi pour analyser des requêtes bancaires en français et renvoyer un JSON structuré avec :

  • l’intention prédite
  • les entités extraites
  • le score du modèle
  • l’indicateur de fallback

La version 2.0.0 embarque le modèle actuellement entraîné et le moteur d’inférence aligné sur infer_intent_entities.py du projet principal.

✨ Nouveautés de la v2.0.0

Inference Entities Packaging Models

  • Synchronisation du package avec la logique actuelle de infer_intent_entities.py
  • Embarquement des modèles spaCy les plus récents du projet
  • Meilleure normalisation des textes bruités et des accents
  • Extraction plus robuste des montants : 2000, 25 mille, un million
  • Canonicalisation plus fiable des bénéficiaires : mon frèrefrere, ma tantetante
  • Meilleure gestion des formulations naturelles : place 2000 sur le compte de Chantal
  • Overrides d’intentions plus solides pour solde, historique, aide, salutation, annulation et virement

🚀 Installation

Depuis le dossier local

pip install .

Depuis GitHub

pip install git+https://github.com/hkdebendo/banking_nlp.git

🧠 API publique

  • banking_nlp.predict(text: str, score_threshold: float = 0.60, margin_threshold: float = 0.15) -> dict
  • banking_nlp.warmup() -> None

✅ Exemple rapide

import banking_nlp

result = banking_nlp.predict("Je veux envoyer 5000 francs à Chantal")
print(result)

Sortie possible :

{
  "intention": "VIREMENT_INIT",
  "entités": {
    "beneficiaire": "chantal",
    "montant": "5000"
  },
  "score": 0.9987,
  "fallback": false
}

🧪 Exemples d’utilisation

import banking_nlp

print(banking_nlp.predict("Quel est mon solde actuel ?"))
print(banking_nlp.predict("Montre mes opérations du mois dernier"))
print(banking_nlp.predict("Place 2000 sur le compte de Fiacre"))
print(banking_nlp.predict("Envoie un million à ma tante"))
print(banking_nlp.predict("Comment puis-je utiliser le service ?"))

🎯 Intentions supportées

  • CONSULTER_SOLDE
  • HISTORIQUE_SIMPLE
  • HISTORIQUE_FILTRE
  • VIREMENT_INIT
  • ANNULATION
  • aide
  • salutation
  • INCOMPRIS

🧩 Entités extraites

  • VIREMENT_INITbeneficiaire, montant
  • HISTORIQUE_FILTREtype, time
  • CONSULTER_SOLDEcompte

🛠️ Ce que la v2.0.0 gère mieux

Virements

  • Envoie 10000 francs à mon frère
  • Place 2000 sur le compte de Chantal
  • Transfère 4000 à ma dada
  • Fais un transfert d’un million à Fiacre

Historique

  • Montre les transactions du mois dernier
  • Affiche les débits depuis lundi
  • Je veux revoir ce qui est passé récemment

Solde

  • Quel est mon solde actuel ?
  • Combien reste-t-il sur mon épargne ?

Aide et salutation

  • Bonjour
  • Wesh
  • Quelles commandes sont disponibles ?

📦 Structure du package

banking_nlp/
  pyproject.toml
  README.md
  MANIFEST.in
  banking_nlp/
    __init__.py
    cli.py
    predictor.py
    py.typed
    resources/
      known_beneficiaires.json
    models/
      intent_textcat_fr/
      slots/

🏁 Build de la distribution

python -m pip install --upgrade build
python -m build

Les nouveaux artefacts de 2.0.0 sont générés dans dist/ sans supprimer les anciens fichiers déjà présents.

🖥️ Commande CLI

banking-nlp-welcome

👤 Auteur

📌 Notes

  • Python recommandé : 3.10+
  • Les modèles spaCy sont embarqués dans le package
  • Aucun entraînement n’est requis côté utilisateur final
  • La sortie est directement exploitable dans une API, un chatbot ou une application bancaire

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

banking_nlp-2.0.0.tar.gz (11.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

banking_nlp-2.0.0-py3-none-any.whl (11.5 MB view details)

Uploaded Python 3

File details

Details for the file banking_nlp-2.0.0.tar.gz.

File metadata

  • Download URL: banking_nlp-2.0.0.tar.gz
  • Upload date:
  • Size: 11.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for banking_nlp-2.0.0.tar.gz
Algorithm Hash digest
SHA256 ce9eadc46043b04df5ca00e0ddf3d400bcd35dc474380ce08e47fe224e5d201e
MD5 611a509a956d4af1f9788289fadba287
BLAKE2b-256 94277583e97ad7dee4f8dc47a8fd7f86ac142401714df5407a01051aa5156d70

See more details on using hashes here.

File details

Details for the file banking_nlp-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: banking_nlp-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for banking_nlp-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29f5656d603d4b848dd6e1d1586297198ace39f57b69a50741b9ddab5189a2bb
MD5 dded0cef8e58a1a15236636da6b6d475
BLAKE2b-256 ce2cb13a192a663c15bfa6f91f46c73ce969a1b2854168978f1a2b55e037a255

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page