I really like that you have provided a reference for each of lexicon induction method. Can you let please let me know where you have adopted dist function from?
def dist(embeds, positive_seeds, negative_seeds, **kwargs):
polarities = {}
sim_mat = similarity_matrix(embeds, **kwargs)
for i, w in enumerate(embeds.iw):
if w not in positive_seeds and w not in negative_seeds:
pol = sum(sim_mat[embeds.wi[p_seed], i] for p_seed in positive_seeds)
pol -= sum(sim_mat[embeds.wi[n_seed], i] for n_seed in negative_seeds)
polarities[w] = pol
return polarities
Hi @williamleif,
I really like that you have provided a reference for each of lexicon induction method. Can you let please let me know where you have adopted dist function from?
Regards Nader