add NLP code from SYMBOLS chapter