Learn R Programming

wikiTools (version 1.2.8)

normalizedTitle: Return the normalized and redirect title from the response

Description

Return the normalized and the redirect title (also normalized), if any, from the query part of the JSON response of a MediaWiki search. The response of the MediaWiki API query (https://www.mediawiki.org/wiki/API:Query) includes original page titles and possibily normalized and redirected titles, if the API needs to obtain them. For a original title, this function returns them, if any.

Usage

normalizedTitle(title, q)

Value

A vector with the normalized or redirected page title (target, also normalized) found for the title.

Arguments

title

The title likely to be found in q.

q

The query part of the JSON response (j['query']) from a Mediawiki search. Note that this part contains some titles, so it is necessary to search the original "title" in that part.