def make_pairs(sent, dist):
    """
    For each word in sentence `sent`, consider its neighbors in window_size `ws`.
    Assign each neighbor according to the distribution `dist` = [dist1, dist2, dist3,...]

    left3, left2, left1, word, right1, right2, right3
    dist1, dist2, dist3,     , dist3,  dist2,  dist1

    Return an iterator over 2 types of pair:
        (left_i, word, dist_i) and
        (word, right_i, dist_i)
    """
    n = len(sent)
    ws = min(len(dist), n-1)
    pairs = []
    for i in range(n-1):
        pairs += [(sent[i], sent[i+w+1], dist[w]) for w in range(ws) if i+w+1 < n]
    return pairs