empathy-machines-0.5.1


توضیحات

An off-the-rack NLP sentiment classifier- upload your own corpus or use the pre-installed ones
ویژگی مقدار
سیستم عامل -
نام فایل empathy-machines-0.5.1
نام empathy-machines
نسخه کتابخانه 0.5.1
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Preston Parry
ایمیل نویسنده ClimbsBytes@gmail.com
آدرس صفحه اصلی https://github.com/ClimbsRocks/EmpathyMachines
آدرس اینترنتی https://pypi.org/project/empathy-machines/
مجوز MIT
# empathyMachines > A standalone NLP sentiment classifier you can import as a module ## Purposes 1. Offer a batteries-included NLP classifier you can use either on it's own, or to make sentiment predictions as part of a broder NLP project (for example, when classifying customer messages, whether the customer is angry or not might help you determine if this is a compensation request, or a request to adjust their address.) 1. Have the entire sentiment prediction process scaffolded so you can feed in your own training corpus, and easily train an NLP sentiment classifier. ## How to use 1. Download the repo from GitHub (pip install coming later) 1. `cd` into repo, and `pip install -r requirements.txt` 1. In your Python code, `from EmpathyMachines import EmpathyMachines` 1. `nlp_classifier = EmpathyMachines()` 1. `nlp_classifier.train(corpus='Twitter')` 1. `nlp_classifier.predict(text_string)` ### Corpora included ### Include your own corpus (UNDER CONSTRUCTION) Feel free to train a classifier on your own corpus! Two ways to do this: 1. Read in a .csv file with header row containing "sentiment", "text", and optionally, "confidence" 1. Pass in an array of Python dictionaries, with attributes for "sentiment", "text", and optionally, "confidence" 1. Create a .csv file with the following fields 1. `nlp_classifier.train(corpus='custom', corpus_path='path/to/custom/corpus.csv', analytics_output=False)`


نحوه نصب


نصب پکیج whl empathy-machines-0.5.1:

    pip install empathy-machines-0.5.1.whl


نصب پکیج tar.gz empathy-machines-0.5.1:

    pip install empathy-machines-0.5.1.tar.gz