I want to view term frequencies in documents, my documents contain Persian text. I used R as follows:
keycorpus <- Corpus(DirSource("E:\\Sample\\farsi texts"))
tm.matrix <- TermDocumentMatrix(keycorpus)
View(as.matrix(tm.matrix))
Although this code is OK for english texts, unfortunately it does not work on Persian texts. How can I do this?