search for: mycorpus

Displaying 3 results from an estimated 3 matches for "mycorpus".

Did you mean: corpus
2013 Sep 26
0
R hangs at NGramTokenizer
...rary(RWeka)> library(topicmodels)> library(RTextTools)> cl=makeCluster(detectCores())> invisible(clusterEvalQ(cl, library(tm)))> invisible(clusterEvalQ(cl, library(RWeka))) > invisible(clusterEvalQ(cl, library(topicmodels)))> invisible(clusterEvalQ(cl, library(RTextTools)))> myCorpus <-Corpus(DirSource("/home/neeph/Test/DMOZ_Business"), encoding="UTF-8", readerControl=list(reader=readPlain))> removeURL <- function(x) gsub("http[[:alnum:]]*", "", x)> myCorpus <- tm_map(myCorpus, removeURL)> removeAmp <- function(x) gsu...
2012 Feb 26
2
tm_map help
...ccurs with #qantas, hashtags like #asx, #obama work ok. Appreciate any help. Thanks, Sachin library(twitteR) library(tm) library(wordcloud) hashTag<-function (hashTag, minFreq){ tweets<- searchTwitter(hashTag, n=200) df <- do.call("rbind", lapply(tweets, as.data.frame)) myCorpus <- Corpus(VectorSource(df$text)) myCorpus <- tm_map(myCorpus, function(x) iconv(enc2utf8(x), sub = "byte")) myCorpus <- tm_map(myCorpus, tolower) myCorpus <- tm_map(myCorpus, removePunctuation) myCorpus <- tm_map(myCorpus, removeNumbers) myStopwords <- c(stopwords('e...
2009 Aug 10
1
Sorting text docs based on document meta values in tm()
Hi all, I wonder if there's any way to reshuffle the text collection by the document meta values. For instance, if I have 5 documents that correspond to the following meta data: MetaID Sex Age 0 M 38 0 M 46 0 F 24 0 F 49 0 F 33 Can I reorder the text documents based on the ascending order of age? Thank you very much!! -- View