protected int sum(String word) { TagCount count = dict.get(word); if (count != null) { return count.sum(); } return 0; }