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

Description Usage Format See Also Examples

Description

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

Usage

1
2
3

Format

DSM_TermContextMatrix is a sparse numeric matrix of class dgCMatrix with 7 rows and 7 columns.

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

Columns specify the occurrence frequencies of these nouns in Wikipedia articles on Felidae, Pet, Feral, Boat, Philosohpy, Kant and Back Pain.

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

See Also

This matrix/DSM describes the same target nouns as the term-term matrix DSM_TermTermMatrix and corresponding DSM object DSM_TermTerm.

Examples

1
2
3
4
5
6
DSM_TermContextMatrix["time", ] # row vector for target noun "time"

all.equal(DSM_TermContextMatrix, head(DSM_TermContext, Inf))

# M M' = symmetric matrix of co-occurrence frequencies of nouns within articles
tcrossprod(DSM_TermContextMatrix) 

wordspace documentation built on Jan. 9, 2020, 1:08 a.m.