Skip to content

Commit

Permalink
修复由于python数组长度在循环判断中不改变导致的部分标点符号分词失败问题
Browse files Browse the repository at this point in the history
  • Loading branch information
MaJunhua committed Feb 14, 2017
1 parent 64d5917 commit 6a7ee99
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions thulac/manage/Punctuation.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ def adjustSeg(self, sentence):
return
tmpVec = []
for i in range(len(sentence)):
if(i>=len(sentence)):
break
tmp = sentence[i]
if(self.__pDat.getInfo(tmp) >= 0):
continue
Expand All @@ -36,6 +38,8 @@ def adjustTag(self, sentence):
tmpVec = []
findMulti = False
for i in range(len(sentence)):
if (i >= len(sentence)):
break
tmp = sentence[i][0]
if(self.__pDat.getInfo(tmp) >= 0):
continue
Expand Down

0 comments on commit 6a7ee99

Please sign in to comment.