tsroten / pynlpir

A Python wrapper around the NLPIR/ICTCLAS Chinese segmentation software.
MIT License
566 stars 135 forks source link

get_key_words issue #9

Closed terry2tan closed 10 years ago

terry2tan commented 10 years ago

Hi,

I was using the get_key_words function, just found a bug. Sometimes, the text was short, then there were no keywords, so the value "fresult" is empty, then we can't split an empty string.

add a judgement may solve this problem.

anyway, THX for your tool~

tsroten commented 10 years ago

@terry2tan Thanks for reporting this bug. I will take a look at it tomorrow as I am not near a computer right now.

On Jun 18, 2014, at 18:06, terry2tan notifications@github.com wrote:

Hi,

I was using the get_key_words function, just found a bug. Sometimes, the text was short, then there were no keywords, so the value "fresult" is empty, then we can't split an empty string.

add a judgement may solve this problem.

anyway, THX for your tool~

— Reply to this email directly or view it on GitHub.

tsroten commented 10 years ago

If no key words are found, get_key_words() returns an empty list.