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
3203f457
Commit
3203f457
authored
Sep 28, 2018
by
高雅喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change build file
parent
8aabb5af
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
build.sbt
eda/node2vec/build.sbt
+1
-2
Main.scala
eda/node2vec/src/main/scala/com/gmei/Main.scala
+1
-1
No files found.
eda/node2vec/build.sbt
View file @
3203f457
...
...
@@ -26,8 +26,7 @@ libraryDependencies ++= Seq(
"org.scalatest"
%%
"scalatest"
%
"3.0.5"
%
"test"
,
"com.github.nscala-time"
%%
"nscala-time"
%
"2.18.0"
,
"com.github.scopt"
%%
"scopt"
%
"3.7.0"
,
"com.google.guava"
%
"guava"
%
"19.0"
,
"com.github.fommil.netlib"
%
"all"
%
"1.1.2"
"com.google.guava"
%
"guava"
%
"19.0"
)
lazy
val
root
=
(
project
in
file
(
"."
)).
settings
(
commonSettings
:
_
*
)
...
...
eda/node2vec/src/main/scala/com/gmei/Main.scala
View file @
3203f457
...
...
@@ -180,7 +180,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
).
take
(
10
).
map
(
_
.
_2
).
mkString
(
","
)
val
similar
=
similarWords
.
toSeq
.
sortBy
(-
1
*
_
.
_3
).
filter
(
_
.
_2
.
startsWith
(
"diary"
)).
take
(
10
).
map
(
_
.
_2
).
mkString
(
","
)
(
word1
,
s
"$similar"
)
}
// print out the results for the first 10 words
...
...
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