Added enhanced version of NGrams assignment