| compareDictionaries | R Documentation |
Routine compares two dictionaries in terms of how similarities and differences. Among the calculated measures are the total of distinct words, the overlap between both dictionaries, etc.
compareDictionaries(d1, d2)
d1 |
is the first sentiment dictionary of type |
d2 |
is the first sentiment dictionary of type |
Returns list with different metrics depending on dictionary type
Currently, this routine only supports the case where both dictionaries are of the same type
SentimentDictionaryWordlist,
SentimentDictionaryBinary,
SentimentDictionaryWeighted for the specific classes
d1 <- SentimentDictionary(c("uncertain", "possible", "likely"))
d2 <- SentimentDictionary(c("rather", "intend", "likely"))
cmp <- compareDictionaries(d1, d2)
d1 <- SentimentDictionary(c("increase", "rise", "more"),
c("fall", "drop"))
d2 <- SentimentDictionary(c("positive", "rise", "more"),
c("negative", "drop"))
cmp <- compareDictionaries(d1, d2)
d1 <- SentimentDictionary(c("increase", "decrease", "exit"),
c(+1, -1, -10),
rep(NA, 3))
d2 <- SentimentDictionary(c("increase", "decrease", "drop", "neutral"),
c(+2, -5, -1, 0),
rep(NA, 4))
cmp <- compareDictionaries(d1, d2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.