if (require(polmineR.sampleCorpus) && require(rcqp)){
use(polmineR.sampleCorpus)
spd <- partition(
"PLPRBTTXT", text_party="SPD", text_type="speech"
)
kauder <- partition(
"PLPRBTTXT", text_name="Volker Kauder", pAttribute="word"
)
merkel <- partition(
"PLPRBTTXT", text_name=".*Merkel",
pAttribute="word", regex=TRUE
)
sAttributes(merkel, "text_date")
sAttributes(merkel, "text_name")
merkel <- partition(
"PLPRBTTXT", text_name="Angela Dorothea Merkel",
text_date="2009-11-10", text_type="speech", pAttribute="word"
)
merkel <- subset(merkel, !word %in% punctuation)
merkel <- subset(merkel, !word %in% tm::stopwords("de"))
}
Run the code above in your browser using DataLab