def generator_fn(words_file, tags_file):
    'Enumerator to enumerate through words_file and associated tags_file one line at a time\n\n    :param words_file: file path of the words file (one sentence per line)\n    :param tags_file: file path of tags file (tags corresponding to words file)\n    :return enumerator that enumerates over the format (words, len(words)), tags one line at a time from input files.\n    '
    with Path(words_file).open('r') as f_words, Path(tags_file).open('r') as f_tags:
        for (line_words, line_tags) in zip(f_words, f_tags):
            (yield parse_fn(line_words, line_tags))
Enumerator to enumerate through words_file and associated tags_file one line at a time

:param words_file: file path of the words file (one sentence per line)
:param tags_file: file path of tags file (tags corresponding to words file)
:return enumerator that enumerates over the format (words, len(words)), tags one line at a time from input files.
def generator_fn(words_file, tags_file):
    'Enumerator to enumerate through words_file and associated tags_file one line at a time\n\n    :param words_file: file path of the words file (one sentence per line)\n    :param tags_file: file path of tags file (tags corresponding to words file)\n    :return enumerator that enumerates over the format (words, len(words)), tags one line at a time from input files.\n    '
    with Path(words_file).open('r') as f_words, Path(tags_file).open('r') as f_tags:
        for (line_words, line_tags) in zip(f_words, f_tags):
            (yield parse_fn(line_words, line_tags))