def read_analogy_file(filename):
    """
    Read the analogy task test set from a file.
    """
    section = None
    with open(filename, 'r') as questions_file:
        for line in questions_file:
            if line.startswith(':'):
                section = line[2:].replace('\n', '')
                continue
            else:
                words = line.replace('\n', '').split(' ')
            yield section, words
