letiantian / TextRank4ZH

:deciduous_tree:从中文文本中自动提取关键词和摘要
MIT License
3.25k stars 844 forks source link

運行 python test.py 報錯 #1

Closed ghost closed 9 years ago

ghost commented 9 years ago
File "test.py", line 11, in <module>
    tr4w = TextRank4Keyword(stop_words_file='./stopword.data')  # 导入停止词
  File "/home/fanlia/github/TextRank4ZH/textrank4zh/TextRank4Keyword.py", line 25, in __init__
    self.seg = Segmentation(stop_words_file=stop_words_file, delimiters=delimiters)
  File "/home/fanlia/github/TextRank4ZH/textrank4zh/Segmentation.py", line 104, in __init__
    self.ss = SentenceSegmentation(delimiters)
  File "/home/fanlia/github/TextRank4ZH/textrank4zh/Segmentation.py", line 81, in __init__
    self.delimiters = unicode(delimiters)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 3: ordinal not in range(128)
letiantian commented 9 years ago

非常感谢,已经修复。