An NGrams class was implemented by more optimal way.
An options p,s was added