home << dhlab reference << dhlab.api.dhlab_api
get_reference#
from dhlab.api.dhlab_api import get_reference
- get_reference(corpus='digavis', from_year=1950, to_year=1955, lang='nob', limit=100000)[source]#
Reference frequency list of the n most frequent words from a given corpus in a given period.
Call the API
BASE_URL
endpoint /reference_corpus.- Parameters:
corpus (str) – Document type to include in the corpus, can be either
'digibok'
or'digavis'
.from_year (int) – Starting point for time period of the corpus.
to_year (int) – Last year of the time period of the corpus.
lang (str) – Language of the corpus, can be one of
'nob,', 'nno,', 'sme,', 'sma,', 'smj', 'fkv'
limit (int) – Maximum number of most frequent words.
- Returns:
A
pandas.DataFrame
with the results.- Return type:
DataFrame