nlp-tools-py-lib
python simple nlp library
installation
pip install nlp-tools-py-lib
usage
# main.py
from nlp_tools.preprocessing import Preprocessing
from nlp_tools.loaders import MdLoader
from nlp_tools.representations import MergedMatrixRepresentation
from nlp_tools.classifiers import ClassificationProcessor, NaiveBayseTfIdfClassifier
TRAIN_PATH = 'demo_training.md'
def build_classifier():
loader = MdLoader(TRAIN_PATH)
processor = Preprocessing(loader)
repres = MergedMatrixRepresentation(processor.data)
classifier = ClassificationProcessor(NaiveBayseTfIdfClassifier(), repres)
classifier.train()
def predict(text: str):
message = repres.process_new_data(processor.process_sentence(text))
intent, score = classifier.predict(message)
return intent, score
return predict
training.md example :
# intents
## my_first_intent_name
### responses
- ...
### example
- ...
Release files for nlp-tools-py-lib 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nlp-tools-py-lib-0.1.1.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nlp_tools_py_lib-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.2 kB
Release files / nlp-tools-py-lib-0.1.1.tar.gz
| Download URL | nlp-tools-py-lib-0.1.1.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b7a3fe778b30356e6643d8da0fe95a7341e9a6d08fb24941629c069477ea7f3
|
|
BLAKE2b-256 checksum How to use checksums |
e72469aef2d5f343a0cc8cf6e1b055ddeb2ae8ec020cec485230f256c4d10f03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.2 CPython/3.7.6 Windows/10
|
Release files / nlp_tools_py_lib-0.1.1-py3-none-any.whl
| Download URL | nlp_tools_py_lib-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
20aaa199554a44ed2367e2cb7e0a7f5f3cd3372e7062b1a102768bcadb4b66ee
|
|
BLAKE2b-256 checksum How to use checksums |
6663f6cbe97e667c289c29ba82b3a51f5efcc0b216b9bebd55c86113a59e2085
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.2 CPython/3.7.6 Windows/10
|