very first port of ngram lira package, it does not compile yet