w_SearchByInstanceof {wikiTools}R Documentation

Get entities which are instance of a Wikidata entity

Description

Get all Wikidata entities which are instance of one o more Wikidata entities like films, cities, etc. If parameter langsorder=”, then no labels or descriptions of the entities are returned, otherwise the function returns them in the language order indicated in langsorder.

Usage

w_SearchByInstanceof(instanceof, langsorder = "", nlimit = 2500, debug = FALSE)

Arguments

instanceof

Wikidata entity of which the entities searched for are an example or member of it (class). For example, if instanceof="Q229390" return Wikidata entities of class Q229390 (3D films). More than one entities can be included in the instanceof parameter, with '|' or '&' separator:

  • if '|' (instanceof='Q229390|Q202866') then the OR operator is used.

  • if '&' (instanceof='Q229390|Q202866') then the AND operator is used. Note that '|' and '&' cannot be present at the same time.

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. If langsorder==”, then labels or descriptions are not returned.

nlimit

If the number of entities in the database or authorities' catalog exceeds this number, then query are made in chunks. The value can increase if langorder=”. 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. If debug='count' the function only returns the number of entities.

Value

A data-frame. Index of the data-frame is also set to the list of entities found.

Author(s)

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

Examples

## Not run: 
w <- w_SearchByInstanceof('Q229390|Q25110269', langsorder = 'es|en')
w <- w_SearchByInstanceof('Q229390&Q25110269', langsorder = 'es|en')

## End(Not run)

[Package wikiTools version 1.2.7 Index]