fix pylint

Signed-off-by: kenwoodjw <blackxin55+@gmail.com>
pull/20605/head
kenwoodjw 12 months ago
parent 3ff1f646a4
commit 52ca2c5537

@ -720,7 +720,17 @@ STOPWORDS = {
"", "",
"", "",
"", "",
" ", " ",
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"0", "0",
"1", "1",
"2", "2",
@ -731,16 +741,6 @@ STOPWORDS = {
"7", "7",
"8", "8",
"9", "9",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"", "",
"", "",
"", "",

@ -261,7 +261,7 @@ class OracleVector(BaseVector):
words = pseg.cut(query) words = pseg.cut(query)
current_entity = "" current_entity = ""
for word, pos in words: for word, pos in words:
if pos in {"nr", "Ng", "eng", "nz", "n", "ORG", "v"}: # nr: 人名, ns: 地名, nt: 机构名 if pos in {"nr", "Ng", "eng", "nz", "n", "ORG", "v"}: # nr: 人名ns: 地名,nt: 机构名
current_entity += word current_entity += word
else: else:
if current_entity: if current_entity:

Loading…
Cancel
Save