Advertisement
viraco4a

Suggestion

Mar 25th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. for (String wordKey : oldSO.keySet()) {
  2. if (!newSO.containsKey(wordKey)) {
  3. newSO.put(wordKey, oldSO.get(wordKey));
  4. } else {
  5. SemanticOccurance so = new SemanticOccurance();
  6. so.setCount(newSO.get(wordKey).getCount() + oldSO.get(wordKey).getCount());
  7. newSO.put(wordKey, so);
  8. }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement