Index: trunk/WikiWord/WikiWord/src/main/java/de/brightbyte/wikiword/disambig/SlidingCoherenceDisambiguator.java |
— | — | @@ -100,9 +100,11 @@ |
101 | 101 | if (initialWindow == 1) r = popularityDisambiguator.disambiguate(sequences, root, meanings, context); |
102 | 102 | else r = super.disambiguate(sequences, root, meanings, context); |
103 | 103 | |
104 | | - sequence.addAll(r.getSequence()); |
105 | | - currentNode = getLastNode(root, sequence); |
106 | | - disambig.putAll(r.getMeanings()); |
| 104 | + if ( r != null ) { |
| 105 | + sequence.addAll(r.getSequence()); |
| 106 | + currentNode = getLastNode(root, sequence); |
| 107 | + disambig.putAll(r.getMeanings()); |
| 108 | + } |
107 | 109 | } |
108 | 110 | |
109 | 111 | while (true) { |