fixed minor bug in nltk_process function