Machine learning for natural language processing