Machine learning is used in natural language processing for sentiment analysis, text classification, language translation, speech recognition, and question answering systems.