dhlab.api.nb_search_api

Module Contents

Functions

load_picture

Load the raw image object from a URL.

iiif_manifest

Fetch the IIIF manifest of the scanned book images

mods

super_search

Search for a term, return a json object with the matches.

total_search

Retrieve the first size occurrences from page.

get_df

Get phrases from documents of title, and aggregate their frequencies.

get_json

get_data

get_data_and

get_df_pd

get_konks

get_phrase_info

API

dhlab.api.nb_search_api.load_picture(url: str)

Load the raw image object from a URL.

dhlab.api.nb_search_api.iiif_manifest(urn: str)

Fetch the IIIF manifest of the scanned book images

dhlab.api.nb_search_api.mods(urn: str)

Search for a term, return a json object with the matches.

Parameters:
  • term (str) – Search term, word, or token. Default is the empty string.

  • number (int) – Size of the response. Maximum 50.

  • page (int) – The page number to search from. … todo:: Fill in description.

  • mediatype (str) – Default ‘bilder’. … todo:: Which other value options are available for this parameter?

Returns:

a dict (json object) with the search results.

Retrieve the first size occurrences from page.

Wrapper-function for :func:super_search with arguments medietype="bilder" and term=''.

dhlab.api.nb_search_api.get_df(phrases: Iterable, title: str = 'aftenposten')

Get phrases from documents of title, and aggregate their frequencies.

dhlab.api.nb_search_api.get_json(phrases, mediatype='aviser')
dhlab.api.nb_search_api.get_data(frase, media='avis', title='jazznytt')
dhlab.api.nb_search_api.get_data_and(frases, title='aftenposten', media='avis')
dhlab.api.nb_search_api.get_df_pd(frase, media='bøker')
dhlab.api.nb_search_api.get_konks(urn, phrase, window=1000, n=1000)
dhlab.api.nb_search_api.get_phrase_info(urn, phrase, window=1000, n=1000)