Description Usage Arguments Warnings Examples
View source: R/getRevisionHistory.R
Returns wikiRevisionHistory R6-class for an specific wikipedia page, after having parsed an xml wikipedia extraction.
1 | getRevisionHistory(page.title, file, granularity = c("sentence", "word"))
|
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. |
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.
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.