def to_doc(cls, candidates, lang="ja"): descs = [c.description for c in candidates] return Document.load_docs(descs, lang=lang)
def to_doc(cls, candidates, lang="ja"): descs = [] for c in candidates: descs.append("\n".join([s.title + " " + s.description for s in c.spots])) return Document.load_docs(descs, lang=lang)