Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
027ee47b
Commit
027ee47b
authored
Aug 29, 2019
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change tets
parent
1a474266
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
rerank_esmm.py
rerank_esmm.py
+9
-5
No files found.
rerank_esmm.py
View file @
027ee47b
...
...
@@ -26,13 +26,17 @@ def get_user_profile():
tags
=
{}
for
i
in
tmp
:
tags
[
i
[
"content"
]]
=
i
[
"score"
]
tags
=
sorted
(
tags
.
items
(),
key
=
lambda
x
:
x
[
1
],
reverse
=
True
)
if
len
(
tags
)
>
5
:
tag_score
=
tags
[:
5
]
print
(
tag_score
)
tag_sort
=
sorted
(
tags
.
items
(),
key
=
lambda
x
:
x
[
1
],
reverse
=
True
)
tags
=
[]
if
len
(
tag_sort
)
>
5
:
for
i
in
range
(
5
):
tags
.
append
(
tag_sort
[
i
][
0
])
print
(
tags
)
return
tag_score
else
:
print
(
tags
)
for
i
in
tag_sort
:
tags
.
append
(
tag_sort
[
i
][
0
])
print
(
tags
)
return
tags
...
...
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