Mathematical Foundations of Natural Language Modeling