GETTING BUSY
OXYME
AT
Now
Next things
TBD/TBF(s)
NOW
DSI
Sum of domains DSI
/
Sum of domains importance
*
50
BRAND DSI
=
def generate(chatters:List[ApiChatter]):Option[DsiResult] = {
LOGGER.info(s"DSI Chatters: ${chatters.size} for brand")
if (!chatters.isEmpty) {
val dsiDomainMap = groupByDomain(chatters)
val dsiDomains = dsiDomainMap.values
val totalDomainWeight = dsiDomains.map(_.importance).sum
val dsiScore = if (totalDomainWeight != 0) {
dsiDomains.map(_.dsiScore).sum / totalDomainWeight * 50.0f
} else 0
Some(DsiResult(dsiDomainMap, totalDomainWeight, dsiScore))
} else {
None
}
}
DOMAIN DSI
=
DOMAIN SENTIMENT
*
DOMAIN
IMPORTANCE
def apply(chatters:List[ApiChatter]):DsiDomain = {
val fqdn = chatters.head.fqdn
val relevantStatementCount = chatters.map(_.relevantStatementCount.toInt).sum
// Better crash here when there is no importance
val importance = chatters.head.importance.get
val dsiChatters = chatters.map(DsiChatter(_,relevantStatementCount))
val sentiment = dsiChatters.map(_.weightedSentiment).sum
val dsi = sentiment * importance
DsiDomain(fqdn, relevantStatementCount, importance, dsiChatters, sentiment, dsi)
}
IT'S A SCORE
IT CHANGES
WHY?
deck
By Anton Liulichev
deck
- 562