def train_and_save_doc2vec(docs, output_file, options = {}): print "Training model..." model = Doc2Vec(docs, **options) model.save(output_file)