私は、汚染物質の運命と輸送に関するテキスト文書のコーパスを持っています。termdocumentmatrix と用語の関連付けを行いました。ただし、用語間の「傾向の関連性」を見つけたいと思います。たとえば、周辺光が増えると化学物質 X の加水分解が増加するかどうかを調べたいと思います。termdomumentmatrix には既に「light」、「hydrolysis」、「increase」、「chemicalX」がありますが、上記の質問に答えるにはどうすればよいですか? 私はすでにこれらの用語の間で findAssocs を行っており、それらはある程度積極的にリンクされていることに注意してください (すべて 0.5 以上)。
お知らせ下さい。ありがとう
以下は、私が使用した大まかな tm プロセスです。他にも多くのドキュメントがあり、たとえば、小さなテキストを抜粋しただけであることに注意してください。
> require(tm)
> my.docs <- c("These experiments showed that the ordinary and the polarized
+ lights had a stimulating effect on the hydrolytic process, and
+ both of about the same magnitude. When hydrolysis goes on
+ (Curves I and II in Figs. 3 and 4) in the presence of light, a larger
+ amount of the starch substrate is hydrolyzed. The differences
+ between the two curves (ordinary light and polarized light) are
+ quite insignificant; they are of the magnitude of twice the probable
+ error of the mean and so far as it is consistent it can be attributed
+ to the slight differences existing in the spectral composition of the
+ lights.
+
+ The situation regarding the effect of radiation on the starch-
+ diastase system is, in brief:
+ 1. Ordinary light and polarized light, of the same intensity and
+ as closely as possible similar in spectral composition, have the
+ same effect.
+ 2. Light falling on the starch-diastase system as described, increases
+ the rate of hydrolysis over that of the same reaction in the
+ dark.
+ ")
> funcs <- list(tolower, removePunctuation, stripWhitespace, removeNumbers)
> lightC <- Corpus(VectorSource(my.docs))
> lightCC <- tm_map(lightC, FUN=tm_reduce, tmFuns=funcs)
> my.dictionary.terms <- tolower(c("light","hydrolysis","increases","decreases","reduce","starch"))
> my.dictionary <- Dictionary(my.dictionary.terms)
> tdmLight <- TermDocumentMatrix(lightCC, control=list(weight=weightTfIdf, stopwords=stopwords("english"), dictionary=my.dictionary))
> findAssocs(tdmLight, "light", 0.5)