⚡️ 不展示只有一个字的热词
This commit is contained in:
parent
dfdcf63413
commit
66c11ef54c
2
task.py
2
task.py
@ -132,7 +132,7 @@ def generate(group):
|
|||||||
# print(word + "\t" + flag)
|
# print(word + "\t" + flag)
|
||||||
if flag in ["n", "nr", "nz", "PER", "f", "ns", "LOC", "s", "nt", "ORG", "nw"]:
|
if flag in ["n", "nr", "nz", "PER", "f", "ns", "LOC", "s", "nt", "ORG", "nw"]:
|
||||||
# 判断该词是否有效,不为空格
|
# 判断该词是否有效,不为空格
|
||||||
if re.match(r"^\s+?$", word) is None:
|
if re.match(r"^\s+?$", word) is None and len(word) > 1:
|
||||||
word_list.append(word)
|
word_list.append(word)
|
||||||
# print(word_list)
|
# print(word_list)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user