Description Usage Arguments Value Author(s) Examples
Get cooccurrence statistics.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | cooccurrences(.Object, ...)
## S4 method for signature 'character'
cooccurrences(.Object, keep = NULL, cpos = NULL,
pAttribute = "word", window = 5, method = "new", verbose = TRUE)
## S4 method for signature 'partition'
cooccurrences(.Object, window = 5, keep = list(pos =
c("NN", "ADJA")), method = "ll", big = FALSE, tcm = FALSE, mc = FALSE,
progress = TRUE, verbose = TRUE, ...)
## S4 method for signature 'partitionBundle'
cooccurrences(.Object,
mc = getOption("polmineR.mc"), ...)
|
.Object |
a partition object |
... |
further parameters that will be passed into bigmatrix (applies only of big=TRUE) |
keep |
list with tokens to keep |
cpos |
integer vector with corpus positions, defaults to NULL - then the corpus positions for the whole corpus will be used |
pAttribute |
the pAttribute of the tokens |
window |
no of tokens to the left and to the right of nodes |
method |
statistical test to use (defaults to "ll") |
verbose |
logical, whether to be verbose |
big |
logical, whether to use bigmatrix |
tcm |
logical, if TRUE, a term-cooccurrence matrix (sparse matrix, simple_triplet_matrix) will be returned |
mc |
whether to use multicore |
progress |
logical, whether to be verbose |
a cooccurrences-class object
Andreas Blaette
1 2 3 4 5 6 7 8 | ## Not run:
use(polmineR.sampleCorpus)
merkel <- partition("PLPRBTTXT", text_type = "speech", text_name = ".*Merkel", regex = TRUE)
merkel <- enrich(merkel, pAttribute = "word")
cooc <- cooccurrences(merkel, keep = NULL)
cooc <- cooccurrences(merkel, keep = NULL, big = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.