def sents_to_file(some_generator, output_file='out.txt'):
    """ writes sents provided by some generator to a file
        :param some_generator: A generator yielding strings
        :param output_file: Filename of the output.
        :return: filename of the output
    """
    with open(output_file, 'w', encoding="utf-8") as f:
        f.writelines(some_generator)
    return output_file