️ 不展示只有一个字的热词

This commit is contained in:
xtaodada 2021-07-11 13:25:57 +08:00
parent dfdcf63413
commit 66c11ef54c
No known key found for this signature in database
GPG Key ID: EE4DC37B55E24736
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
## 当前版本 ## 当前版本
v2.3 v2.4
## 更新维护日志 ## 更新维护日志

View File

@ -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)