collocations(inaugTexts[49:57], method="all", n=10)
collocations(inaugTexts[49:57], method="all", size=3, n=10)
collocations(subset(inaugCorpus, Year>1980), method="pmi", size=3, n=10)
txt <- c("This is software testing: looking for (word) pairs!
This [is] a software testing again. For.",
"Here: is a software testing, looking again for word pairs.")
collocations(txt)
collocations(txt, size=2:3)
removeFeatures(collocations(txt, size=2:3), stopwords("english"))
Run the code above in your browser using DataLab