def get_weight_for(token, dict_df, avg_scheme, modality="@lemmatized"):
    """
    Calculates weight used for averaging
    See: Schmidt C. W. Improving a tf-idf weighted document vector embedding
    https://arxiv.org/abs/1902.09875

    Not all schemes are supported currently

    Parameters
    ----------
    token: str
    dict_df: pandas.DataFrame
    avg_scheme: str

    Returns
    -------
    float
    """
    key = (modality, token)
    data = dict_df.loc[key, :]
    if avg_scheme == "tf-idf":
        w = data.idf
    elif avg_scheme == "unit":
        w = 1
    else:
        raise NotImplementedError
    return w