commit | cb43e49cac12f2afd50855483ee4346392975fad | [log] [tgz] |
---|---|---|
author | Marc Kupietz <kupietz@ids-mannheim.de> | Tue Dec 03 10:07:53 2019 +0100 |
committer | Marc Kupietz <kupietz@ids-mannheim.de> | Tue Dec 03 10:07:53 2019 +0100 |
tree | 487f09898234ccf2ea8738006a24d9514dda5cd8 | |
parent | 969cab9c3172a771fdbed7b8e6af26e04a14b453 [diff] [blame] |
derecovecs: allow word string and index number in API calls
diff --git a/w2v-server.c b/w2v-server.c index cc8734c..3a8092c 100644 --- a/w2v-server.c +++ b/w2v-server.c
@@ -534,6 +534,13 @@ return (wl); } +long getWordNumber(char *word) { + wordlist *wl = getTargetWords(word, 0); + if(wl->length > 0) + return(wl->wordi[0]); + return(0); +} + float get_distance(long b, long c) { long a; float dist = 0;