First working version of ngram generator
Fixed some invalid symbol problems