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
946829cc
Commit
946829cc
authored
Jun 19, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
判断是否是下线的
parent
efa0c9a4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
wordresemble.py
trans2es/utils/wordresemble.py
+8
-3
No files found.
trans2es/utils/wordresemble.py
View file @
946829cc
...
...
@@ -40,16 +40,17 @@ class WordResemble(object):
@classmethod
def
get_resemble_list
(
cls
,
instance
):
try
:
try
:
ret_list
=
list
()
item_dict
=
dict
()
keyword
=
instance
.
keyword
no_cut_word
=
False
cut_bool
=
False
cut_word
=
[
"下线"
,
"停用"
,
"已经下线"
,
"账号停用"
]
for
i
in
cut_word
:
if
keyword
.
find
(
i
)
>=
0
:
no_cut_word
=
True
if
no_cut_word
==
False
:
cut_bool
=
True
if
cut_bool
==
False
:
item_dict
[
"id"
]
=
getMd5Digest
(
str
(
instance
.
keyword
))
item_dict
[
"ori_name"
]
=
instance
.
keyword
item_dict
[
"is_online"
]
=
True
...
...
@@ -62,9 +63,13 @@ class WordResemble(object):
suggest_list
=
get_tips_suggest_list
(
instance
.
keyword
)
return
(
item_dict
,
suggest_list
)
except
:
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
return
([],
[])
except
:
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
return
list
()
@classmethod
def
get_all_data_name_mapping_results_to_redis
(
cls
,
instance
):
...
...
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