Browse files

fix for stemming issue

  • Loading branch information...
1 parent 2841400 commit 9bcafb8b83bdc6e859eaf73e0c1e1cd5e9741ec6 Adam Cooper committed Feb 17, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 History Visualiser/HistoryVis.R
View
5 History Visualiser/HistoryVis.R
@@ -67,8 +67,9 @@ if(brew.type=="c"){
corp<-Corpus(DataframeSource(table), readerControl=list(reader= readTabular(mapping=map)))
# Standard document-term matrix of the entire corpus, use the standard stopword set with a few modifications!
stop.words<-CustomStopwords()
-dtm.tf<-DocumentTermMatrix(corp,
- control=list(stemming=TRUE, stopwords=stop.words, minWordLength=3, removeNumbers=TRUE, removePunctuation=TRUE))
+corp<-tm_map(corp,removeNumbers)
+corp<-tm_map(corp2,removePunctuation)
+dtm.tf<-DocumentTermMatrix(corp2, control=list(stemming=TRUE, stopwords=stop.words, minWordLength=3))
dtm.bin<-weightBin(dtm.tf)
# pull out the sentiment data
pos.score<-unlist(meta(corp,tag="Positive", type="local"))

0 comments on commit 9bcafb8

Please sign in to comment.