Model function

Represents n-gram models