Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mark Sammons
illinois-wrapper
Commits
262f22b3
Commit
262f22b3
authored
Jul 19, 2016
by
kklin4
Browse files
small addition of returning 0 when word is not found
parent
1697c2eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/edu/illinois/cs/cogcomp/wrapper/Wrapper.java
View file @
262f22b3
...
...
@@ -97,11 +97,17 @@ public class Wrapper {
e
.
printStackTrace
();
}
boolean
not_found
=
false
;
if
(
stringSplitA
==
null
)
{
System
.
out
.
println
(
stringA
+
" is not in the embedding file. "
);
not_found
=
true
;
}
if
(
stringSplitB
==
null
)
{
System
.
out
.
println
(
stringB
+
" is not in the embedding file. "
);
not_found
=
true
;
}
if
(
not_found
)
{
return
0.0
;
//equivalent to saying that there is no evidence for similarity (positive number) or disimilarity (negative number)
}
double
[]
embeddingA
=
new
double
[
stringSplitA
.
length
-
1
];
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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