Skip to main content

simple nlp library

Project description


python simple nlp library


pip install nlp-tools-py-lib


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


def build_classifier():
    loader = MdLoader(TRAIN_PATH)
    processor = Preprocessing(loader)
    repres = MergedMatrixRepresentation(
    classifier = ClassificationProcessor(NaiveBayseTfIdfClassifier(), repres)

    def predict(text: str):
        message = repres.process_new_data(processor.process_sentence(text))
        intent, score = classifier.predict(message)
        return intent, score
    return predict example :

# intents

## my_first_intent_name

### responses

- ...

### example

- ...

Project details

Download files

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

Files for nlp-tools-py-lib, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size nlp_tools_py_lib-0.1.1-py3-none-any.whl (7.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size nlp-tools-py-lib-0.1.1.tar.gz (5.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page