NLP: Understanding the N-gram language models