2014-02-12 41 views
3

我使用tm.plugin.tags進行情感分析:[R TM封裝tm.plugin.tags停止工作

pos=sapply(search.corpus,tm_tag_score,tm_get_tags("Positiv")) 
neg=sapply(search.corpus,tm_tag_score,tm_get_tags("Negativ")) 

不知何故停在我的Linux機器上運行。該庫加載時沒有警告,並顯示爲在RStudio的包視圖中加載。但功能不可用:

No documentation for ‘tm_tag_score’ in specified packages and libraries: 
you could try ‘??tm_tag_score’ 

但是,相同的腳本在Windows中工作正常。 有誰知道問題可能是什麼?

回答

4

這裏閱讀:http://cran.fyxm.net/web/packages/tm/news.html - 在tm包中它已更名爲tm_term_score

library(tm) 
tm_tag_score <- tm_term_score 

(真是太巧了。我大約2小時前碰到了同樣的問題)

+1

謝謝!我在這裏拉我的頭髮。找到它2小時前,找不到解決方案。確實是巧合! – Henk