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

DSM_TermContextMatrixR Documentation

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

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


DSM_TermContextMatrix

DSM_TermContext

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


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 Aug. 23, 2022, 1:06 a.m.