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
c1ee2b28
Commit
c1ee2b28
authored
Oct 08, 2018
by
高雅喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change cid count
parent
48797936
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
Main.scala
eda/node2vec/src/main/scala/com/gmei/Main.scala
+1
-1
No files found.
eda/node2vec/src/main/scala/com/gmei/Main.scala
View file @
c1ee2b28
...
...
@@ -176,7 +176,7 @@ object Main {
val
result
=
remapSecond
.
groupBy
(
_
.
_1
).
map
{
case
(
word1
,
similarWords
)
=>
// sort by score desc. and take top 10 entries
val
similar
=
similarWords
.
toSeq
.
sortBy
(-
1
*
_
.
_3
).
filter
(
_
.
_2
.
startsWith
(
"diary"
)).
take
(
1
0
).
map
(
_
.
_2
).
mkString
(
","
)
val
similar
=
similarWords
.
toSeq
.
sortBy
(-
1
*
_
.
_3
).
filter
(
_
.
_2
.
startsWith
(
"diary"
)).
take
(
5
0
).
map
(
_
.
_2
).
mkString
(
","
)
(
word1
,
s
"$similar"
)
}
result
.
take
(
20
).
foreach
(
println
)
...
...
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