get_ngram_from_newspapers {dhlabR}R Documentation

Get Ngram Count per Year for National Library Newspaper Collection

Description

This function queries the National Library's book collection API to retrieve the ngram count per year for the specified parameters. It can be used to plot an ngram based on the words' presence in books in the library's collection.

Usage

get_ngram_from_newspapers(
  city = NULL,
  ddk = NULL,
  lang = NULL,
  period = list(),
  publisher = NULL,
  title = NULL,
  topic = NULL,
  word = list("hus", "blokk")
)

Arguments

city

(character, optional) The city of publication. Default is NULL.

ddk

(character, optional) The Dewey Decimal Classification (DDC) code. Default is NULL.

lang

(character, optional) The language code of the books. Default is NULL.

period

(list, optional) A list containing the start and end years of the period to search. Default is an empty list.

publisher

(character, optional) The publisher's name. Default is NULL.

title

(character, optional) The title or a part of the title of the books. Default is NULL.

topic

(character, optional) A topic or subject associated with the books. Default is NULL.

word

(list, optional) A list of words (ngrams) to search for in the books. Default is list("hus", "blokk").

Value

A data frame with the ngram count per year for the specified parameters.


[Package dhlabR version 1.0.2 Index]