This commit is contained in:
xieshen 2020-10-19 14:43:13 +08:00
parent 156e62fa23
commit b652639aae
1 changed files with 5 additions and 5 deletions

View File

@ -163,7 +163,7 @@ def test_json(request):
if len(x) > 1 and x != '\r\n':
c[x] += 1
for (k, v) in c.most_common(200): # 遍历输出高频词
print('%s%s %s %d' % (' ' * (5 - len(k)), k, '*', v))
if all(map(lambda c:'\u4e00' <= c <= '\u9fa5',k)):
o = dict()
o['name'] = k
o['value'] = v