Skip to content

Commit 66905e0

Browse files
committedJun 22, 2018
1 parent d57c0ec commit 66905e0

File tree

4 files changed

+3
-2
lines changed

4 files changed

+3
-2
lines changed
 

‎chapter-3/分词.ipynb

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
" if not line:\n",
2929
" continue\n",
3030
" self.dictionary.add(line)\n",
31-
" self.maximum = len(line)\n",
31+
" if len(line) > self.maximum:\n",
32+
" self.maximum = len(line)\n",
3233
" def cut(self, text):\n",
3334
" result = []\n",
3435
" index = len(text)\n",

‎chapter-6/PCFG.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@
3434

3535
sentence = parser.raw_parse(seg_str)
3636
for line in sentence:
37-
print(line)
37+
print(line.leaves())
3838
line.draw()

‎chapter-7/.DS_Store

0 Bytes
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)
Please sign in to comment.