Documentation

API documentation

We use pdoc to generate our API documentation. To develop with live reloading, use the following command:

LaTeX math in docstrings

To use LaTeX-style equations, we recommend using raw strings for docstrings:

r"""My docstring

Thanks to the r prefix, we can write math without needing to escape \:

$$\sum_{i=1}^{\vert X \vert} x_{i}$$
"""

Docker

# execute the following command from the project root:
docker run --rm -it -v $PWD:/app \
  -p 8001:8001 \
  parsertongue/clu-spacy:latest \
  pdoc --html -c latex_math=True --force --output-dir docs/api --http 0.0.0.0:8001 clu

Open your browser to localhost:8001/clu/spacy to see live updates.

Anaconda

source activate clu-spacy
# execute the following command from the project root:
pdoc --html -c latex_math=True --force --output-dir docs/api --http 0.0.0.0:8001 clu

Open your browser to localhost:8001/clu/spacy to see live updates.

General documentation

We use mkdocs to generate our site documentation from markdown. Markdown source files are located udner the docs directory.

Docker

# execute the following command from the project root:
docker run --rm -it -v $PWD:/app \
  -p 8000:8000 \
  parsertongue/clu-spacy:latest \
  mkdocs serve -a 0.0.0.0:8000

Open your browser to localhost:8000 to see live updates.

Anaconda

To develop the documentation with live reloading, run the following command:

source activate clu-spacy
# execute the following command from the project root:
mkdocs serve -a 0.0.0.0:8000