Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
search_tips
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rank
search_tips
Commits
760a98f3
Commit
760a98f3
authored
Feb 20, 2020
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
58ef93f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
wordresemble.py
trans2es/utils/wordresemble.py
+3
-2
No files found.
trans2es/utils/wordresemble.py
View file @
760a98f3
...
...
@@ -44,13 +44,14 @@ class WordResemble(object):
try
:
ret_list
=
list
()
item_dict
=
dict
()
suggest_list
=
list
()
keyword
=
instance
.
keyword
cut_bool
=
False
cut_word
=
[
"下线"
,
"停用"
,
"已经下线"
,
"账号停用"
]
for
i
in
cut_word
:
if
keyword
.
find
(
i
)
>=
0
:
cut_bool
=
True
ret_bol
=
QueryWordAttr
.
save_query_to_redis
(
query
=
str
(
instance
.
name
))
ret_bol
=
QueryWordAttr
.
save_query_to_redis
(
query
=
str
(
instance
.
keyword
))
if
not
cut_bool
and
ret_bol
:
item_dict
[
"id"
]
=
getMd5Digest
(
str
(
instance
.
keyword
))
item_dict
[
"ori_name"
]
=
instance
.
keyword
...
...
@@ -237,7 +238,7 @@ class WordResembleV1(object):
for
i
in
cut_word
:
if
keyword
.
find
(
i
)
>=
0
:
cut_bool
=
True
ret_bol
=
QueryWordAttr
.
save_query_to_redis
(
query
=
str
(
instance
.
name
),
type_v1
=
True
)
ret_bol
=
QueryWordAttr
.
save_query_to_redis
(
query
=
str
(
instance
.
keyword
),
type_v1
=
True
)
if
not
cut_bool
and
ret_bol
:
item_dict
[
"id"
]
=
getMd5Digest
(
str
(
instance
.
keyword
))
item_dict
[
"ori_name"
]
=
instance
.
keyword
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment