Allow ngram API to smooth frequency queries
Move ngram tests into separate file