home << dhlab reference << dhlab.api.dhlab_api
get_document_frequencies#
from dhlab.api.dhlab_api import get_document_frequencies
- get_document_frequencies(urns=None, cutoff=0, words=None)[source]#
Fetch frequency counts of
words
in documents (urns
).Call the API
BASE_URL
endpoint/frequencies
.- Parameters:
urns (list) – list of uniform resource name strings, for example:
["URN:NBN:no-nb_digibok_2008051404065", "URN:NBN:no-nb_digibok_2010092120011"]
cutoff (int) – minimum frequency of a word to be counted
words (list) – a list of words to be counted - if left None, whole document is returned. If not None both the counts and their relative frequency is returned.