Skip to main content

Library for text and image analysis by the Digital Humanities lab (DH-lab)

Project description


DHLAB is a library of python modules for accessing text and pictures at the National Library of Norway.

The National Library of Norway (NLN), Nasjonalbiblioteket (NB) in Norwegian, has developed an API (Application Programming Interface) to query the texts in the library's digital archive of books and newspapers, NB Digital.

The Digital Humanities lab group at the NLN has developed the dhlab library on top of the API, which offers functionalities for scientists to access the literary archive with python.

The API allows for deeper analysis of the digital texts by generating e.g. word frequency lists, concordances, collocations, n-grams, as well as extracting names and narrative graphs.

Analyses can be performed on both a single document, and on a larger corpus. It is also possible to build one's own corpora based on bibliographic metadata.

Example use

The Jupyter Notebooks in the digital_tekstanalyse repo show examples on how to use the library, and can be used directly in your browser without prior programming experience.


Install dhlab with pip:

pip install dhlab

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for dhlab, version 2.0.9
Filename, size File type Python version Upload date Hashes
Filename, size dhlab-2.0.9.tar.gz (49.2 kB) File type Source Python version None Upload date Hashes View
Filename, size dhlab-2.0.9-py3-none-any.whl (54.5 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page