From cf14be6dacf8c2b51ca543647066c5679b3d7a85 Mon Sep 17 00:00:00 2001 From: hankcs Date: Sun, 12 Jul 2015 15:43:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=81=A5=E5=A3=AE=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/hankcs/hanlp/seg/Segment.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/hankcs/hanlp/seg/Segment.java b/src/main/java/com/hankcs/hanlp/seg/Segment.java index 2b7e798e1..4e94237e8 100644 --- a/src/main/java/com/hankcs/hanlp/seg/Segment.java +++ b/src/main/java/com/hankcs/hanlp/seg/Segment.java @@ -235,6 +235,7 @@ protected static List combineByCustomDictionary(List vertexList) { for (int i = 0; i < wordNet.length; ++i) { + if (wordNet[i] == null) continue; BaseNode state = CustomDictionary.trie.transition(wordNet[i].realWord.toCharArray(), 0); if (state != null) {