# NOT RUN {
# compile some typical DSMs for spoken part of BNC
bncS <- subset(DSM_VerbNounTriples_BNC, mode == "spoken")
dim(bncS) # ca. 14k verb-rel-noun triples
# dependency-filtered DSM for nouns, using verbs as features
# (note that multiple entries for same relation are collapsed automatically)
bncS_depfilt <- dsm(
target=bncS$noun, feature=bncS$verb, score=bncS$f,
raw.freq=TRUE, verbose=TRUE)
# dependency-structured DSM
bncS_depstruc <- dsm(
target=bncS$noun, feature=paste(bncS$rel, bncS$verb, sep=":"), score=bncS$f,
raw.freq=TRUE, verbose=TRUE)
# }
Run the code above in your browser using DataLab