Comment and documentation of nlp.py