-
Notifications
You must be signed in to change notification settings - Fork 0
nlu setup
Rodrigo Serra edited this page Nov 28, 2023
·
1 revision
In the source of the NLP repository there is an automated script for installing (nlu_setup.sh).
source $ROS_WORKSPACE/mbot_natural_language_processing/repository.debs
In case that does not work for you, below you can consult manual installation instructions.
WARNING: https://bazel.build/bazel-release.pub.gpg key is expired!! manual installation will not work... use only automated script option, see above
sudo pip install tensorflow
install syntaxnet(sentence divider)
- install bazel:
install JDK 8:
sudo apt-get install openjdk-8-jdk
echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
sudo apt-get update && sudo apt-get install bazel
sudo apt-get upgrade bazel
-
install swig:
sudo apt-get install swig -
install mock:
sudo pip install mock -
install asciitree:
sudo pip install asciitree -
install numpy (most probably already installed):
sudo pip install numpy -
install pygraphviz:
sudo apt-get install -y graphviz libgraphviz-dev sudo pip install pygraphviz --install-option="--include-path=/usr/include/graphviz" --install-option="--library-path=/usr/lib/graphviz/" -
clone tensorflow models (recursive flag is needed):
cd ~/Software && git clone --recursive https://github.com/socrob/models.git
configure tensorflow models:
cd ~/Software/models/syntaxnet/tensorflow
./configure
use default suggested paths (hit enter twice)
answer all no's to not install unnecessary stuff
-
bazel compilation - test:
export PYTHON_LIB_PATH=/usr/lib/python2.7/dist-packages export PYTHON_BIN_PATH=`which python` && cd ~/Software/models/research/syntaxnet && bazel test ... -
install the SyntaxNet and DRAGNN Python modules:
mkdir /tmp/syntaxnet_pkg bazel-bin/dragnn/tools/build_pip_package --output-dir=/tmp/syntaxnet_pkg sudo pip install /tmp/syntaxnet_pkg/syntaxnet-0.2-cp27-cp27mu-linux_x86_64.whl