We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a0692b commit 111fa2bCopy full SHA for 111fa2b
1 file changed
src/main/java/com/hankcs/hanlp/seg/Segment.java
@@ -245,6 +245,7 @@ protected static List<Vertex> combineByCustomDictionary(List<Vertex> vertexList)
245
CoreDictionary.Attribute value = null;
246
for (; to < wordNet.length; ++to)
247
{
248
+ if (wordNet[to] == null) continue;
249
state = state.transition(wordNet[to].realWord.toCharArray(), 0);
250
if (state == null) break;
251
if (state.getValue() != null)
@@ -258,6 +259,7 @@ protected static List<Vertex> combineByCustomDictionary(List<Vertex> vertexList)
258
259
StringBuilder sbTerm = new StringBuilder();
260
for (int j = start; j < end; ++j)
261
262
+ if (wordNet[j] == null) continue;
263
sbTerm.append(wordNet[j]);
264
wordNet[j] = null;
265
}
0 commit comments