def prob_words(context, vocab, temperature=1.0):
 dot = np.dot(vocab, context)
 prob = _softmax((dot / temperature))
 return prob

def prob_words ( context , vocab , temperature = 1.0 ) : dot = np . dot ( vocab , context ) prob = _softmax ( ( dot / temperature ) ) return prob
this calculates a softmax over the vocabulary as a function of the dot product of context and word .