Compiling the reference_ngram list before looping over output_ngrams actually solved the other problem as well,
because the entirety of the reference is searched before any word2vec things are done. However, had to chase down
another bug, which is the source of the delay between these commits