w2v-server: hack for DeReKo-2018-RC1: remove quot as garbage
diff --git a/w2v-server.pl b/w2v-server.pl
index a5ef690..3e3a683 100755
--- a/w2v-server.pl
+++ b/w2v-server.pl
@@ -453,16 +453,22 @@
for (i = 0; i < words; i++) {
w = vocab + i * max_w;
previous = 0;
- while((c = *w++) && !garbage[i]) {
- if( ((c <= 90 && c >= 65) && (previous >= 97 && previous <= 122)) ||
- (previous == '-' && (c & 32)) ||
- (previous == 0xc2 && (c == 0xa4 || c == 0xb6 )) ||
- c == '<'
- ) {
- garbage[i]=1;
- continue;
+ if(strncmp("quot", w, 4) == 0) {
+ garbage[i]=1;
+ printf("Gargabe: %s\n", vocab + i * max_w);
+ } else {
+ while((c = *w++) && !garbage[i]) {
+ if( ((c <= 90 && c >= 65) && (previous >= 97 && previous <= 122)) ||
+ (previous == '-' && (c & 32)) ||
+ (previous == 0xc2 && (c == 0xa4 || c == 0xb6 )) ||
+ (previous == 'q' && c == 'u' && *(w) == 'o' && *(w+1) == 't') || /* quot */
+ c == '<'
+ ) {
+ garbage[i]=1;
+ continue;
+ }
+ previous = c;
}
- previous = c;
}
}
return;