Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
ReaderBench
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
14
Issues
14
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReaderBench
ReaderBench
Commits
74ae53ee
Commit
74ae53ee
authored
Jan 22, 2018
by
stefan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug with w2v loaded for every request
parent
a310cdad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
src/main/java/com/readerbench/data/SemanticCorpora.java
src/main/java/com/readerbench/data/SemanticCorpora.java
+1
-1
src/main/java/com/readerbench/services/semanticModels/word2vec/Word2VecModel.java
...bench/services/semanticModels/word2vec/Word2VecModel.java
+2
-1
No files found.
src/main/java/com/readerbench/data/SemanticCorpora.java
View file @
74ae53ee
...
...
@@ -60,7 +60,7 @@ public enum SemanticCorpora implements Serializable {
this
.
corpora
=
corpora
;
this
.
lang
=
lang
;
this
.
simType
=
simType
;
this
.
fullPath
=
SEMANTIC_CORPORA_ROOT
+
'/'
+
lang
.
toString
().
toUpperCase
()
+
'/'
+
simType
.
getAcronym
()
+
'/'
+
corpora
;
this
.
fullPath
=
SEMANTIC_CORPORA_ROOT
+
lang
.
toString
().
toUpperCase
()
+
'/'
+
simType
.
getAcronym
()
+
'/'
+
corpora
;
}
public
String
getCorpora
()
{
...
...
src/main/java/com/readerbench/services/semanticModels/word2vec/Word2VecModel.java
View file @
74ae53ee
...
...
@@ -105,12 +105,13 @@ public class Word2VecModel implements ISemanticModel {
}
public
static
Word2VecModel
loadWord2Vec
(
String
path
,
Lang
language
)
{
path
+=
"/word2vec.model"
;
for
(
Word2VecModel
w2v
:
LOADED_WORD2VEC_MODELS
)
{
if
(
path
.
equals
(
w2v
.
getPath
()))
{
return
w2v
;
}
}
Word2VecModel
w2v
=
loadFromTextFile
(
path
+
"/word2vec.model"
,
language
);
Word2VecModel
w2v
=
loadFromTextFile
(
path
,
language
);
LOADED_WORD2VEC_MODELS
.
add
(
w2v
);
return
w2v
;
}
...
...
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