Libère tes chaînes de mots — Bibliothèque pédagogique NLP pour la formation LCM
Project description
lcm-nlp — Libère tes chaînes de mots
Bibliothèque Python pédagogique pour le traitement automatique du langage naturel (NLP), conçue pour accompagner la formation Libère tes chaînes de mots.
Installation
pip install lcm-nlp
Modules
| Module | Description |
|---|---|
regex_utils |
Expressions régulières et automates (DFA) |
preprocessing |
Tokenisation, normalisation, stemming, distance d'édition |
ngrams |
Modèles de langue N-grammes (lissage Laplace, interpolation) |
classification |
Classification Naive Bayes, sac de mots, TF-IDF |
evaluation |
Métriques d'évaluation (précision, rappel, F1, validation croisée) |
ner |
Reconnaissance d'entités nommées (règles, IOB) |
embeddings |
Plongements de mots (cooccurrence, SVD, similarité cosinus) |
search |
Moteur de recherche textuelle avec TypeSense |
corpus_loader |
Chargement du corpus Pleine Confiance (cybersécurité) |
emoji_analysis |
Analyse d'emojis dans les textes |
sentence_analysis |
Analyse de phrases (POS, lisibilité, complexité) |
text_reuse |
Réutilisation de contenu, LDA, phrases clés |
linkedin |
Chargement et analyse de données LinkedIn |
Utilisation rapide
from lcm_nlp.preprocessing import tokenize, remove_stopwords
from lcm_nlp.classification import NaiveBayesClassifier
# Tokenisation
tokens = tokenize("Le traitement du langage naturel est fascinant.", method="words_only")
tokens = remove_stopwords(tokens)
print(tokens)
# → ['traitement', 'langage', 'naturel', 'fascinant']
# Classification
clf = NaiveBayesClassifier()
clf.train([
(["excellent", "film"], "positif"),
(["mauvais", "nul"], "négatif"),
])
print(clf.predict(["superbe", "film"])) # → "positif"
Licence
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lcm_nlp-1.3.0.tar.gz
(48.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
lcm_nlp-1.3.0-py3-none-any.whl
(57.2 kB
view details)
File details
Details for the file lcm_nlp-1.3.0.tar.gz.
File metadata
- Download URL: lcm_nlp-1.3.0.tar.gz
- Upload date:
- Size: 48.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
138d9462ceb101e019d0eca5e0111efe38f40bcdd7484ec4844c0d30f9d8d48c
|
|
| MD5 |
ac3e1296ee60b7d9b6818a4685afad54
|
|
| BLAKE2b-256 |
30c89bb04084951980647b79a02bf5df7410a516c057d6911bac45aafcac5d4c
|
File details
Details for the file lcm_nlp-1.3.0-py3-none-any.whl.
File metadata
- Download URL: lcm_nlp-1.3.0-py3-none-any.whl
- Upload date:
- Size: 57.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8277c2f15a3eda6adf53251d8638833a36ad0e9a360b76439737d386f1a6734d
|
|
| MD5 |
98e312e6f32c9495f57762ada7d12e47
|
|
| BLAKE2b-256 |
372aee5c7893fb31b0d838b82f398cb726533b83349a7794cd09059671191e04
|