Is it possible to reproduce the eye-diagram described here from the topic model/
https://github.com/ouzor/eyediagram/blob/master/example.R 


and shown here:
https://github.com/ouzor/eyediagram/blob/master/example/ExampleEyeDiagram.pdf

The code do not work in processing as suggested by the author and the outhor 
seems 
not to be interested in developing the code further. Here is a toy
topic model using yahoo headline news to start with. 
###############################################################
library(XML)
source <- "http://finance.yahoo.com/q/h?s=AAPL+Headlines";
d <- htmlParse(source)
text <- as.data.frame(xpathSApply(d, 
"//ul[contains(@class,'newsheadlines')]/following::ul/li/a", xmlValue))
colnames(text) <- c("topics")
fix(text)
library(stm)
#Stemming/stopword removal
textss <- textProcessor(text$topics, metadata=text)
#str(textss)
model <- stm(textss$documents, textss$vocab, K=10, data=textss$meta, seed=5678)
labelTopics(model)
plot.STM(model, text.cex=0.8, type='summary', xlim=c(0, 0.5), n=4)
#How can we create an eye-diagram with document-topic-words

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to