Merge pull request #197 from skyerown/master

修复带权重测试脚本输出结果是调用顺序错误
This commit is contained in:
Sun Junyi 2014-11-07 11:07:19 +08:00
commit 7ce63e53b7

View File

@ -38,6 +38,6 @@ tags = jieba.analyse.extract_tags(content, topK=topK, withWeight=withWeight)
if withWeight is True: if withWeight is True:
for tag in tags: for tag in tags:
print "tag: %s\t\t weight: %f" % (tag[1],tag[0]) print "tag: %s\t\t weight: %f" % (tag[0],tag[1])
else: else:
print ",".join(tags) print ",".join(tags)