#修改
This commit is contained in:
parent
156e62fa23
commit
b652639aae
|
@ -163,11 +163,11 @@ def test_json(request):
|
||||||
if len(x) > 1 and x != '\r\n':
|
if len(x) > 1 and x != '\r\n':
|
||||||
c[x] += 1
|
c[x] += 1
|
||||||
for (k, v) in c.most_common(200): # 遍历输出高频词
|
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 = dict()
|
||||||
o['name'] = k
|
o['name'] = k
|
||||||
o['value'] = v
|
o['value'] = v
|
||||||
res.append(o)
|
res.append(o)
|
||||||
return HttpResponse(json.dumps({
|
return HttpResponse(json.dumps({
|
||||||
"res": res
|
"res": res
|
||||||
}))
|
}))
|
||||||
|
|
Loading…
Reference in New Issue