Natural language processing is a subset of artificial intelligence. Some, but not all, NLP techniques fall within machine learning. Modern NLP applications often rely on machine learning algorithms to progressively improve their understanding of natural text and speech. NLP models are based on advanced statistical methods and learn to carry out tasks through extensive training. By contrast, earlier approaches to crafting NLP algorithms relied entirely on predefined rules created by computational linguistic experts.