w2vserver: sanitize deduping with merged vecs
diff --git a/w2v-server.pl b/w2v-server.pl
index c442a2f..6f8d7f5 100755
--- a/w2v-server.pl
+++ b/w2v-server.pl
@@ -975,7 +975,7 @@
for (a = 0, i = 0; i < N && a < N*para_threads; a++) {
int filtered=0;
long long c = best[a].wordi;
- if (dedupe && i > 0) {
+ if ((merge_words && dedupe && i > 1) || (!merge_words && dedupe && i > 0)) {
for (j=0; j<i && !filtered; j++)
if (strcasestr(&vocab[c * max_w], &vocab[chosen[j] * max_w]) ||
strcasestr(&vocab[chosen[j] * max_w], &vocab[c * max_w])) {