Additional setup
Additional setup is required to include libraries required for text processing. Take a look at the following points:
- First is Bazel. On Ubuntu, you will need to follow the official tutorial on this link to install Bazel. https://docs.bazel.build/versions/master/install-ubuntu.html. On macOS, you can use HomeBrew to
install bazel
as follows:
$ brew install bazel
- Then, we will install
swig
, which will allow us to wrap C/C++ functions to allow calls in Python. On Ubuntu, you can install it using:
$ sudo apt-get install swig
On Mac OS, we will also install it using brew
, as follows:
$ brew install swig
- Next, we'll install the protocol buffer support, which will allow us to store and retrieve serialized data in a more efficient manner than with XML. We specifically need version
3.3.0
to install it as follows:
$ pip install -U protobuf==3.3.0
- Our text classification will be represented as trees, so we'll need a library to display trees on the command line. We will install it as follows...