def load_vocabulary(fn):
    """Read the file fn and return a set containing all the words
    of the vocabulary."""
    vocabulary = set()
    with open(fn) as f:
        for line in f:
            vocabulary.add(line.strip())

    return vocabulary