in distant_supervision/synthetic_data_creator.py [0:0]
def _split_by_style_and_write(self, ds_data_rdd):
# Only add to this list if we want to run the dataset directly using BERT
# If the data would be used for style-transfer, you can just use core_data format.
qstyle_lst = QUESTION_STYLES_FOR_JSONLINES
for qstyle in qstyle_lst:
ds_data_rdd.map(lambda x: x.jsonify_single_style(qstyle)).saveAsTextFile(
os.path.join(self.output_dir, qstyle.value))