def get_sense_rank_dict(path_to_index_sense):
    """
    create mapping sense key -> sense rank
    casuistical%3:01:01:: 03053657 1 0 -> casuistical%3:01:01:: -> 1

    :param str path_to_index_sense: wordnet index sense file

    :rtype: dict
    :rtype: mapping wordnet key -> sense rank
    """
    sense_ranks = {}
    with open(path_to_index_sense) as infile:
        for line in infile:
            key, offset, sqr, freq = line.strip().split()
            sense_ranks[key] = int(sqr)

    return sense_ranks