def readDictionary(input):
    """
    Read file to a dictionary data structure:
    Input file is a lexicon consisting lines of the word and the most frequent associated tag 
    """
    
    dictionary = {}
    lines = open(input, "r").readlines()
    for line in lines:
        wordtag = line.strip().split()
        dictionary[wordtag[0]] = wordtag[1]
    return dictionary