dhlab.api.nb_search_api
¶
Module Contents¶
Functions¶
Load the raw image object from a URL. |
|
Fetch the IIIF manifest of the scanned book images |
|
Search for a term, return a json object with the matches. |
|
Retrieve the first |
|
Get |
|
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)¶
- dhlab.api.nb_search_api.super_search(term: str, number: int = 50, page: int = 0, mediatype: str = 'bilder') dict ¶
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.
- dhlab.api.nb_search_api.total_search(size: int = 50, page: int = 0) dict ¶
Retrieve the first
size
occurrences frompage
.Wrapper-function for :func:
super_search
with argumentsmedietype="bilder"
andterm=''
.
- dhlab.api.nb_search_api.get_df(phrases: Iterable, title: str = 'aftenposten')¶
Get
phrases
from documents oftitle
, 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)¶