m_Opensearch {wikiTools} | R Documentation |
Open search of a string
Description
Search string in the content of the project page using OpenSearch. Only in namespace 0. Please, see https://www.mediawiki.org/wiki/API:Opensearch for further information.
Usage
m_Opensearch(
string,
project = "en.wikipedia.org",
profile = "engine_autoselect",
redirects = "resolve"
)
Arguments
string |
String to search. |
project |
Wikimedia project, defaults "en.wikipedio.org". |
profile |
This parameter sets the search type: classic, engine_autoselect (default), fast-fuzzy, fuzzy, fuzzy-subphrases, normal, normal-subphrases, and strict. |
redirects |
If redirects='return', the page title is the normalized one (also the URL). If redirects='resolve", the page title is the normalized and resolved redirection is in effect (also the URL). Note that in both cases the API performs a NFC Unicode normalization on search string. |
Value
A data-frame of page titles and URL returned. If error, return Null.
Note
Only for namespace 0. The function also obtains redirections for disambiguation pages.
Author(s)
Angel Zazo, Department of Computer Science and Automatics, University of Salamanca
Examples
# Some search profiles:
df <- m_Opensearch(string='Duque de Alba', project='es.wikipedia.org',
profile="engine_autoselect", redirects="resolve")
df <- m_Opensearch(string='Duque de Alba', project='es.wikipedia.org', profile="strict")
df <- m_Opensearch(string='Duque de Alba', project='es.wikipedia.org', profile="fuzzy")