[mrph.midasi for mrph in r.mrph_list()] def get_trainings(issue_type): trainings = [] paths = get_file_paths(issue_type) for p in paths: doc = read_file(p) words = morphological_analysis(doc) trainings.append(TaggedDocument(words=words, tags=[p.stem])) return trainings