Natural Language Processing: Foundations