def _get_token_weight(token, token_freq_map, a=1e-3):
    """
    Computes SIF weight (Arora et al. 2017)
    :param token: input word
    :param token_freq_map: dict containing word: word freq.
    :param a: weight parameter
    :return: SIF weight for the word
    """
    token_freq = token_freq_map.get(token, 0.0)
    return a / (a + token_freq)