for(String topic : Tools.getTopics(topicType)) {
topicCounts.put(topic, 0);
}
for(Long uid : Tools.getCSVUserIDs()) {
if(topicType.equals("alchemy")) {
FullAlchemyClassification c = new FullAlchemyClassification(uid);
if(c.getCategorySet().size() == 0) continue;
String topTopic = c.getCategorySet().toArray(new String[1])[0];
topicCounts.put(topTopic,topicCounts.get(topTopic)+1);
} else if(topicType.equals("calais")) {
FullCalaisClassification c = new FullCalaisClassification(uid);
if(c.getCategorySet().size() == 0) continue;
String topTopic = c.getCategorySet().toArray(new String[1])[0];
if(topTopic.equals("Other") && c.getCategorySet().size() > 1) topTopic = c.getCategorySet().toArray(new String[1])[1];
else if(topTopic.equals("Other")) continue;
topicCounts.put(topTopic,topicCounts.get(topTopic)+1);
} else if(topicType.equals("textwise")) {
FullTextwiseClassification c = new FullTextwiseClassification(uid,true);
if(c.getCategorySet().size() == 0) continue;
String topTopic = c.getCategorySet().toArray(new String[1])[0];
topicCounts.put(topTopic,topicCounts.get(topTopic)+1);
}
count++;
}
double sum = 0.0;