From d34dab3aa5a3f6eaf25c198ecadaed4aa0fb9270 Mon Sep 17 00:00:00 2001 From: Yuhang Tao <35098797+TITC@users.noreply.github.com> Date: Tue, 7 Dec 2021 21:45:56 +0800 Subject: [PATCH] Update DoubleArrayTrie.java MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原书page78 > 约定check[i]=0代表节点空闲。 --- .../com/hankcs/hanlp/collection/trie/DoubleArrayTrie.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/hankcs/hanlp/collection/trie/DoubleArrayTrie.java b/src/main/java/com/hankcs/hanlp/collection/trie/DoubleArrayTrie.java index e0f9b7c45..3c2be0518 100644 --- a/src/main/java/com/hankcs/hanlp/collection/trie/DoubleArrayTrie.java +++ b/src/main/java/com/hankcs/hanlp/collection/trie/DoubleArrayTrie.java @@ -172,7 +172,7 @@ private int insert(List siblings, BitSet used) resize(pos + 1); outer: - // 此循环体的目标是找出满足base[begin + a1...an] == 0的n个空闲空间,a1...an是siblings中的n个节点 + // 此循环体的目标是找出满足check[begin + a1...an] == 0的n个空闲空间,a1...an是siblings中的n个节点 while (true) { pos++; @@ -1472,4 +1472,4 @@ private void shrink() // } // System.out.println("CheckUsed: " + nonZeroIndex); // } -} \ No newline at end of file +}