修复带权重测试脚本输出结果是调用顺序错误

This commit is contained in:
walkskyer 2014-11-06 22:24:43 +08:00
parent cf2aa88122
commit 6772f0282e

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)