Add support for order=1 to TrieModel

Hi,
   I have modified some code to make it support Ngram order=1. Tested on TrieModel.
   Please check.

changq