Define the NLP API

Implements #33.