def apply_regressor(clf, embed_map, use_norm=False):
 wordvecs = OrderedDict()
 for (i, w) in enumerate(embed_map.vocab.keys()):
  if ('_' not in w):
   wordvecs[w] = clf.predict(embed_map[w]).astype('float32')
   if use_norm:
    wordvecs[w] /= norm(wordvecs[w])
 return wordvecs

def apply_regressor ( clf , embed_map , use_norm = False ) : wordvecs = OrderedDict ( ) for ( i , w ) in enumerate ( embed_map . vocab . keys ( ) ) : if ( '_' not in w ) : wordvecs [ w ] = clf . predict ( embed_map [ w ] ) . astype ( 'float32' ) if use_norm : wordvecs [ w ] /= norm ( wordvecs [ w ] ) return wordvecs
map words from word2vec into rnn word space function modifed from: URL .