home << dhlab reference << dhlab.ngram.nb_ngram
nb_ngram#
from dhlab.ngram.nb_ngram import nb_ngram
- nb_ngram(terms, corpus='bok', smooth=1, years=(1810, 2010), mode='relative', lang='nob')[source]#
Extract N-gram frequencies from given
terms
andyears
.lang
param is not supported for corpus=`avis` and will be set to None ifavis
is passed.- Parameters:
terms (str) – comma
corpus (str) –
smooth (int) –
years (tuple) –
mode (str) –
lang (str) –
- Returns:
A sorted Pandas DataFrame index