skip-thoughts
skip-thoughts copied to clipboard
example usage of `nn_words()`
Do you have an example usage of nn_words
, i.e., as shown in "Table 3: Nearest neighbours of words after vocabulary expansion" in the paper?
It's not clear how to prepare the parameters to pass in -
Many thanks,
def nn_words(table, wordvecs, query, k=10)
'table' is either "model['utable]" or "model['btable']" - I'm not sure what the difference is off the top of my head. 'wordvecs' is the output of "word_features(table)", so either "word_features(model['utable'])" or "word_features(model['btable'])" 'query' is a single word of your choosing.
This should work: skipthoughts(model['utable'], word_features['utable'], 'dog')
Good luck!
Here's an example of use for other methods as well: https://github.com/danielricks/penseur