From 00129923f13a5c5627b4b196129391696b521d40 Mon Sep 17 00:00:00 2001 From: hankcs Date: Fri, 26 Dec 2014 10:39:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hankcs/test/algorithm/AhoCorasickDoubleArrayTrieTest.java | 4 ++-- src/test/java/com/hankcs/test/seg/TestSegment.java | 4 ++-- src/test/java/com/hankcs/test/seg/testBintrie.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/java/com/hankcs/test/algorithm/AhoCorasickDoubleArrayTrieTest.java b/src/test/java/com/hankcs/test/algorithm/AhoCorasickDoubleArrayTrieTest.java index 64946641e..d0891de90 100644 --- a/src/test/java/com/hankcs/test/algorithm/AhoCorasickDoubleArrayTrieTest.java +++ b/src/test/java/com/hankcs/test/algorithm/AhoCorasickDoubleArrayTrieTest.java @@ -170,12 +170,12 @@ public void testSegment() throws Exception { int end = entry.end; int start = entry.begin; -// System.out.printf("[%d:%d]=%s\n", start, end, entry.getValue()); +// System.out.printf("[%d:%d]=%s\n", start, end, entry.value); assertEquals(sentence.substring(start, end), entry.value); } } -// System.out.printf("%d ms\n", System.currentTimeMillis() - timeMillis); + System.out.printf("%d ms\n", System.currentTimeMillis() - timeMillis); } public void testCoreDictionaryACDAT() throws Exception diff --git a/src/test/java/com/hankcs/test/seg/TestSegment.java b/src/test/java/com/hankcs/test/seg/TestSegment.java index 535663e89..387653f4c 100644 --- a/src/test/java/com/hankcs/test/seg/TestSegment.java +++ b/src/test/java/com/hankcs/test/seg/TestSegment.java @@ -31,8 +31,8 @@ public class TestSegment extends TestCase { public void testSeg() throws Exception { -// HanLP.Config.enableDebug(); - Segment segment = new DijkstraSegment().enableCustomDictionary(false); + HanLP.Config.enableDebug(); + Segment segment = new DijkstraSegment().enableCustomDictionary(true); System.out.println(segment.seg("陈膺奥是我的女神")); } diff --git a/src/test/java/com/hankcs/test/seg/testBintrie.java b/src/test/java/com/hankcs/test/seg/testBintrie.java index 96f2096cf..2af4d15fd 100644 --- a/src/test/java/com/hankcs/test/seg/testBintrie.java +++ b/src/test/java/com/hankcs/test/seg/testBintrie.java @@ -66,7 +66,7 @@ public void testPut() throws Exception // { // BinTrie trieNormal = new BinTrie<>(); // SmartBinTrie trieSmart = new SmartBinTrie<>(); -// BinTrie dictionary = CustomDictionary.getTrie(); +// BinTrie dictionary = CustomDictionary.getBinTrie(); // List wordList = new LinkedList<>(); // for (Map.Entry entry : dictionary.entrySet()) // {