Ejemplo n.º 1
0
def mock_text_class_data(train_file, dev_file, test_file):
    logging.info("Generate mock data: {}".format(train_file))
    mock_a_text_file(samples, 1000, train_file)
    logging.info("Generate mock data: {}".format(dev_file))
    mock_a_text_file(samples, 100, dev_file)
    logging.info("Generate mock data: {}".format(test_file))
    mock_a_text_file(samples, 100, test_file)
def mock_text_class_data(train_file, dev_file, test_file, text_vocab_file):
    logging.info("Generate mock data: {}".format(train_file))
    mock_a_text_file(samples, 500, train_file)
    logging.info("Generate mock data: {}".format(dev_file))
    mock_a_text_file(samples, 100, dev_file)
    logging.info("Generate mock data: {}".format(test_file))
    mock_a_text_file(samples, 100, test_file)
    logging.info("Generate text vocab file: {}".format(text_vocab_file))
    save_a_vocab_file(text_vocab_file, text_vocab_list)
Ejemplo n.º 3
0
def mock_text_class_data(train_file, dev_file, test_file, text_vocab_file,
                         data_type):
    samples = samples_dict[data_type]
    logging.info("Generate mock data: {}".format(train_file))
    mock_a_text_file(samples, 300, train_file)
    logging.info("Generate mock data: {}".format(dev_file))
    mock_a_text_file(samples, 100, dev_file)
    logging.info("Generate mock data: {}".format(test_file))
    mock_a_text_file(samples, 100, test_file)
    text_vocab_list = text_vocab_dict[data_type]
    logging.info("Generate text vocab file: {}".format(text_vocab_file))
    save_a_vocab_file(text_vocab_file, text_vocab_list)