[ngrams] some small refactoring

parent 5401daf1
Pipeline #4100 passed with stages
in 61 minutes and 57 seconds