Learn R Programming

wordspace (version 0.2-0)

DSM_TermTermMatrix: Example of a Term-Term Co-occurrence Matrix (wordspace)

Description

This matrix is a typical example of a term-term DSM co-occurrence matrix, derived from the English Wikipedia. It is available as a plain matrix in dense representation, and as a DSM object including marginal frequency data.

Usage

DSM_TermTermMatrix

DSM_TermTerm

Arguments

Format

DSM_TermTermMatrix is a numeric matrix with 7 rows and 7 columns.

Rows represent the target nouns cat, dog, animal, time, reason, cause, effect.

Columns specify co-occurrence frequencies of these nouns with the words breed, tail, feed, kill, important, explain and likely in articles of the English Wikipedia. Co-occurring words must appear within a distance of at most two word tokens of each other.

DSM_TermTerm is an object of class dsm based on the same co-occurrence matrix, but with additional information on marginal frequencies of the target and feature terms.

See Also

This matrix/DSM describes the same target terms as the term-context matrix DSM_TermContextMatrix and corresponding DSM object DSM_TermContext.

Examples

Run this code
# NOT RUN {
DSM_TermTermMatrix["time", ] # row vector for target noun "time"

all.equal(DSM_TermTermMatrix, head(DSM_TermTerm, Inf))

# }
# NOT RUN {
plot(hclust(dist.matrix(DSM_TermTermMatrix, as.dist=TRUE)))
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab