Commit 262f22b3 authored by kklin4's avatar kklin4
Browse files

small addition of returning 0 when word is not found

parent 1697c2eb
......@@ -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];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment