Description Usage Arguments Value Examples
Extract paragraphs that mention islam and terrorism from a text
1 2 | suspect_comm_paragraphs(text, islam_regex = "islam|muslim",
terror_regex = "terror", ignore.case = T, ...)
|
islam_regex |
A regular expression for findings texts that mention islam |
terror_regex |
A regular expression for finding texts that mention terrorism |
ignore.case |
Passed to grepl |
... |
Additional arguments passed to grepl |
corp |
A quanteda corpus |
A quanteda corpus
1 2 3 4 5 6 7 8 | corp = quanteda::corpus(data.frame(stringsAsFactors = F,
id = c(1,2),
date = c('2010-01-01','2010-02-01'),
text = c('terror islam.\n\ntest.\n\nterrorism muslim', 'test.\n\nterrorism islam')
))
corp2 = suspect_comm_paragraphs(corp)
corp2$documents
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.