This code will reword an input phrase from the user using Google's Parsey McParseface parser. More information can be found in the original repo. This the code for 'Build an AI Reader' on Youtube
- Python 2.7 - (https://www.python.org/downloads/)
- bazel - instructions here
- swig
brew install swig
- protobuf
pip install -U protobuf==3.0.0b2
- asciitree
pip install -U protobuf==3.0.0b2
- numpy
pip install numpy
Use pip to install any missing dependencies
Step 1 - Build from source
cd syntaxnet/tensorflow
./configure
cd ..
bazel test syntaxnet/... util/utf8/...
# On Mac, run the following:
bazel test --linkopt=-headerpad_max_install_names \
syntaxnet/... util/utf8/...
Step 2 - Run the demo class with an input phrase of your choice
cd syntaxnet
python test.py find me a restaurant in san francisco
Sample output:
Intent is: discover restaurant
Credit for the vast majority of code here goes to The SyntaxNet team at Google. I've merely created a wrapper around some of the important functions to get people started.