if (FALSE) {
#Semantic Coherence calculations require the original documents so we need
#to reconstruct them here.
temp<-textProcessor(documents=gadarian$open.ended.response,metadata=gadarian)
meta<-temp$meta
vocab<-temp$vocab
docs<-temp$documents
out <- prepDocuments(docs, vocab, meta)
docs<-out$documents
vocab<-out$vocab
meta <-out$meta
topicQuality(model=gadarianFit, documents=docs)
}
Run the code above in your browser using DataLab