getRevisionHistory: The getRevisionHistory function

Description Usage Arguments Warnings Examples

View source: R/getRevisionHistory.R

Description

Returns wikiRevisionHistory R6-class for an specific wikipedia page, after having parsed an xml wikipedia extraction.

Usage

1
getRevisionHistory(page.title, file, granularity = c("sentence", "word"))

Arguments

page.title,

name of the wikipedia page to be parsed. If name includes spaces, article.name needs to include "_".

file,

xml file containing wikipedia revision history.

granularity,

indicated whether to look for differences in either words or sentences. If sentences are chosen, the change in only one word will look as if the whole sentence was modified.

Warnings

This function uses getDiffTexts (which uses LCS). If granularity = "word" is chosen, computation time ofr long wikipedia articles can be high. The use of "sentence" is recommended in these cases.

Examples

1
2
3
getPageXML("Patum_de_Berga", file = 'Patum_de_Berga.xml')
Patum <- getRevisionHistory("Patum de Berga", file = 'Patum_de_Berga.xml')
Patum.words <- getRevisionHistory("Patum de Berga", file = 'Patum_de_Berga.xml', granularity = "word")

neperiana/wikiHistoRyViz documentation built on Nov. 4, 2019, 9:31 p.m.