1

我有一个关于污染物归宿和运输主题的文本文件语料库。我做了术语文档矩阵和术语关联。但是,我想在术语之间找到我们的“趋势关联”。例如,我想知道更多的环境光是否会增加化学物质的水解。我已经在 termdomumentmatrix 中有“光”、“水解”、“增加”和“化学 X”,什么是回答我提出的上述问题的好方法?请注意,我已经在这些术语中完成了 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)
4

0 回答 0