Skip to main content

French banking intent and entities extraction package

Project description

banking_nlp

banking_nlp est un package Python prêt à installer via pip pour extraire:

  • l'intention principale
  • les entités associées

à partir d'un texte utilisateur en français (contexte bancaire).

Auteur

Fonction principale

import banking_nlp

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

Exemple de sortie:

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

Installation

Depuis un dossier local (développement)

pip install .

Depuis GitHub (quand le repo est publié)

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

Utilisation

import banking_nlp

print(banking_nlp.predict("Quel est mon solde actuel ?"))
print(banking_nlp.predict("Montre mes opérations du lundi passé"))
print(banking_nlp.predict("Securise 2000 sur mes économies"))

API publique

  • banking_nlp.predict(text: str, score_threshold: float = 0.60, margin_threshold: float = 0.15) -> dict
  • banking_nlp.warmup() -> None (précharge les modèles en mémoire)

Intentions supportées

  • CONSULTER_SOLDE
  • HISTORIQUE_SIMPLE
  • HISTORIQUE_FILTRE
  • VIREMENT_INIT
  • ANNULATION
  • aide
  • salutation
  • INCOMPRIS (fallback)

Entités extraites

  • VIREMENT_INIT: beneficiaire, montant
  • HISTORIQUE_FILTRE: type, time
  • CONSULTER_SOLDE: compte

Message de bienvenue

Le package affiche un message de bienvenue et de remerciement à la première importation:

  • Bienvenue dans banking_nlp
  • Auteur et contacts

Vous pouvez aussi l'afficher manuellement:

banking-nlp-welcome

Structure

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

Build distribution

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

Les artefacts seront générés dans dist/ (.whl et .tar.gz).

Publication PyPI (optionnel)

python -m pip install --upgrade twine
twine upload dist/*

Notes

  • Python recommandé: 3.10+
  • Le package embarque les modèles spaCy entraînés.
  • Aucun entraînement n'est requis côté utilisateur final.

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-1.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-1.0.0-py3-none-any.whl (11.5 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: banking_nlp-1.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-1.0.0.tar.gz
Algorithm Hash digest
SHA256 83ef4c407d0dcb0cd126b1841b5ea4c15c0e30e57e5399fb986d2df3ab21939d
MD5 0ac9728267a261a5cb57aba7de2a7134
BLAKE2b-256 67759cced5264a5ac60f8dbe8f1719beb020bebda47c84702a1660fb178e1c3b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: banking_nlp-1.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-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0cf02000b623dcefce677d879a5fd8a2e9be3e5113a5ac2d970d96d154be1751
MD5 aa0d891951ecbff40ecf244144a9ae81
BLAKE2b-256 c3fcb964164cfbe96d0cbf5d923ff0325bb707cf81a44e206765c6a76a4f5465

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