Code made for presentation of FCamara meetup
Use the package manager pip to install foobar.
pip install flask
pip install nltk
pip install pyyaml
pip install unicodedata
Open your python console and run it
import nltk
nltk.download('rslp')
nltk.download('punkt')
Run server.py script
py server.py
Obs: The default port is 8081, but can be changed in code in server.py
GET /
Returns application status
Train the algorithm with phrases from code samples
GET /train
Train the algorithm with some sent phrase.
POST /train
body:
phrase:'type something here'
class: 'phrase class'
Returns class with higher matching and your score
GET /classify
body:
phrase:'write something to be classified'
Talk to the robot
GET /chat
body:
phrase:'write something'
teach the algorithm new answers
POST /answer
body:
answer:'type something here'
class: 'answer class'