-
Create virtualenv Please look this site - https://virtualenv.pypa.io/en/stable/userguide/
-
if you are using Ubuntu
pip install -r requirement.txt
-
If you are using windows machine
pip install -r requirement.txt
The above command will fail for few packages likemitie
. So you have to install the following packages manuallypip install numpy,scipy,sklearn,spacy
-
You will have below parts in this projects
- Brain
This part takes care of Natural language understanding. It will recall all information which are stored on brain and response back to human. As of now, it can able to get person's information, their siblings and electronic device handling like switch ON/OFF
- Web(Human Interface)
This is a flask application which use to interact human with DUTCH
-
As pre-requists, you need to train this dutch to do that you need two json files
config
andtraining_data
. config - to train the model using either mitie or spacy training_data - contains data about what the dutch can able to do for you -
To train your model you can use either
spacy
ormitie
algorithm. For my application I am using mitie.-
If you are using
mitie
you should download a.dat
file from https://github.com/mit-nlp/MITIE/releases/download/v0.4/MITIE-models-v0.2.tar.bz2 -
configuration file format https://nlu.rasa.com/pipeline.html#mitie-sklearn
python -m rasa_nlu.train -c config_mitie.json
This step will take times based on your machine configuration
-
-
Once the training is done you will have a
models
folder will be created with a timestamp and given name -
Now you are ready to configure this model with rasa-nlu
python -m rasa_nlu.server -c config_mitie.json --server_model_dirs=./model_YYYYMMDD-HHMMSS
-
To setup the knowledge base for the DUTCH,
- Create sqlite db using these files
creation_script.sql
andinsert.sql
. Use this link for sqlite DB studio http://sqlitebrowser.org/ - Export the created sqlite db and keep that file inside
brain
folder - Use
config.py
file to define all required configurations
- Create sqlite db using these files
-
train dutch data
python -m rasa_nlu.train -d "/brain/data/dutch-data.json" -c "/brain/config_mitie.yml" --project "dutch" -o "/models/nlu"
-
run rasa_nlu server
python -m rasa_nlu.server --path "/models/nlu" -c "/brain/config_mitie.yml"
Test the rasa_nlu server http://localhost:5000/parse?q=who are you&project=dutch&model=model_20180706-222616
-
Done! :). Now you are ready to get conversation with your dutch
python boot.py
Cheers!!
- The electronic device handling part is in-progress. It will connect with a raspi hardware and will do based on sending command to the hardware like switch ON/OFF computer, lights, TV, etc.,
Keep watch...