w_LabelDesc {wikiTools}R Documentation

Return label and/or descriptions of Wikidata entities

Description

Return label and/or descriptions of the entities in entity_list in language indicated in langsorder. Note that entities can be Wikidata entities (Qxxx) or Wikidata properties (Pxxx).

Usage

w_LabelDesc(
  entity_list,
  what = "LD",
  langsorder = "en",
  nlimit = 25000,
  debug = FALSE
)

Arguments

entity_list

A vector with de Wikidata entities.

what

Retrieve only Labels (L), only Descriptions (D) or both (LD).

langsorder

Order of languages in which the information will be returned, separated with '|'. If no information is given in the first language, next is used. This parameter is mandatory, at least one language is required, default 'en'.

nlimit

If the number of entities exceeds this number, chunked queries are done. This is the number of entities requested in each chunk. Please, reduce the default value if error is raised.

debug

For debugging purposes (default FALSE). If debug='info' information about chunked queries is shown. If debug='query' also the query launched is shown.

Value

A data-frame with one column for the entities, and others for the language and the labels and/or descriptions. The index of the dataframe is also set to the entity list.

Author(s)

Angel Zazo, Department of Computer Science and Automatics, University of Salamanca

Examples

## Not run: 
w_LabelDesc(c("Q57860", "Q712609", "Q381800", "P569"), what='LD', langsorder = 'se|es|en')

## End(Not run)

[Package wikiTools version 1.2.7 Index]