Hi all! Coded this up over the holidays, and thought it turned out pretty fun. Curious to hear thoughts & suggestions.
In order to find the “next word” w to say, the program uses a normalized set of word vectors and tries to maximize the product of the cosine similarities between w and each of the two context words. (The idea to maximize this product, rather than finding the word closest to the mean of the context words, comes from the paper “Linguistic Regularities in Sparse and Explicit Word Representations“.) Possible answers are filtered based on some simple heuristics (avoid saying a word that’s been said before, that’s too infrequent or too frequent, etc.).
It’s come up with some fun answers — van + agree –> Accord, facebook + sore –> viral, cursive + movie –> script — but can also sometimes be frustrating. Any thoughts on how to make it more “human-like” would be appreciated 🙂