def reverse_stemming(stem_map):
    rev_stemming = dict()
    for s in stem_map:
        max = 0
        aux = None
        for w in stem_map[s]:
            if max < stem_map[s][w]:
                max = stem_map[s][w]
                aux = w
        if aux is None:
            print "Generate map: The word was not stemmed", s
            print stem_map
            exit(0)
        rev_stemming[s] = aux
    return rev_stemming
dataset/ETHPy150Open sajao/CrisisLex/src-create/build.py/reverse_stemming/original