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
5661d422
Commit
5661d422
authored
Apr 29, 2020
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
f34a07da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
commons.py
trans2es/commons/commons.py
+3
-3
No files found.
trans2es/commons/commons.py
View file @
5661d422
...
...
@@ -58,7 +58,7 @@ def get_tips_suggest_list(instance_cn_name):
else
:
suggest_dict
[
ch_name_term
[
0
]][
"input"
]
.
append
(
ch_name_term
)
if
suggest_item
[
"word_weight"
]
>
suggest_dict
[
ch_name_term
[
0
]][
"word_weight"
]:
suggest_dict
[
ch_name_term
[
0
]][
"word_weight"
]
=
suggest_item
[
"word_weight"
]
suggest_dict
[
ch_name_term
[
0
]][
"word_weight"
]
=
100
+
int
(
suggest_item
[
"word_weight"
])
suggest_dict
[
ch_name_term
[
0
]][
"suggest_type"
]
=
suggest_item
[
"suggest_type"
]
# 拼音
if
py_full_word
!=
ch_full_word
:
...
...
@@ -82,7 +82,7 @@ def get_tips_suggest_list(instance_cn_name):
else
:
suggest_dict
[
py_name_term
[
0
]][
"input"
]
.
append
(
py_name_term
)
if
suggest_item
[
"word_weight"
]
>
suggest_dict
[
py_name_term
[
0
]][
"word_weight"
]:
suggest_dict
[
py_name_term
[
0
]][
"word_weight"
]
=
suggest_item
[
"word_weight"
]
suggest_dict
[
py_name_term
[
0
]][
"word_weight"
]
=
100
+
int
(
suggest_item
[
"word_weight"
])
suggest_dict
[
py_name_term
[
0
]][
"suggest_type"
]
=
suggest_item
[
"suggest_type"
]
# 简写
...
...
@@ -107,7 +107,7 @@ def get_tips_suggest_list(instance_cn_name):
else
:
suggest_dict
[
py_acronym_term
[
0
]][
"input"
]
.
append
(
py_acronym_term
)
if
suggest_item
[
"word_weight"
]
>
suggest_dict
[
py_acronym_term
[
0
]][
"word_weight"
]:
suggest_dict
[
py_acronym_term
[
0
]][
"word_weight"
]
=
suggest_item
[
"word_weight"
]
suggest_dict
[
py_acronym_term
[
0
]][
"word_weight"
]
=
100
+
int
(
suggest_item
[
"word_weight"
])
suggest_dict
[
py_acronym_term
[
0
]][
"suggest_type"
]
=
suggest_item
[
"suggest_type"
]
return
suggest_dict
.
values
()
...
...
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