def compute_frequencies(words):
    """
    Args:
        words: list of words (or n-grams), all are made of lowercase characters
    Returns:
        dictionary that maps string:int where each string
        is a word (or n-gram) in words and the corresponding int
        is the frequency of the word (or n-gram) in words
    """
    Bdict = {} #Bdict is a dictionary that maps each string with its frequency
    for i in words:
        if i in Bdict.keys():
            Bdict[i] += 1
        else:
            Bdict[i] = 1
    return Bdict