home << dhlab reference << dhlab.api.nb_ngram_api
get_ngram#
from dhlab.api.nb_ngram_api import get_ngram
- get_ngram(terms, corpus='avis', lang='nob')[source]#
Fetch raw and relative frequencies for the
terms
.Call the
NGRAM_API
. The frequencies are aggregated per year between 1800-2021.- Parameters:
terms (str) – comma separated string of words
corpus (str) – type of documents to search through
- Returns:
table of annual frequency counts per term
- Return type:
dict