bert_max_doc_str_max_str_pos_clean_doc_noise_doc/run_doc_qa.py
def read_squad_examples_from_generator(input_file, is_training):
    """Read a SQuAD json file into a list of SquadExample."""
    with tf.gfile.Open(input_file, "r") as reader:
        input_data = json.load(reader)["data"]

    tf.logging.info("Reading examples in using generator!")

    examples = [
        example for example in squad_example_generator(input_data, is_training)
    ]
    tf.logging.info("Done Reading.")

    return examples
Read a SQuAD json file into a list of SquadExample.
Read a SQuAD json file into a list of SquadExample.
Read a SQuAD json file into a list of SquadExample .
def read_squad_examples_from_generator(input_file, is_training):
    with tf.gfile.Open(input_file, "r") as reader:
        input_data = json.load(reader)["data"]
    tf.logging.info("Reading examples in using generator!")
    examples = [
        example for example in squad_example_generator(input_data, is_training)
    ]
    tf.logging.info("Done Reading.")
    return examples
def read_squad_examples_from_generator ( input_file , is_training ) : with tf . gfile . Open ( input_file , "r" ) as reader : input_data = json . load ( reader ) [ "data" ] tf . logging . info ( "Reading examples in using generator!" ) examples = [ example for example in squad_example_generator ( input_data , is_training ) ] tf . logging . info ( "Done Reading." ) return examples
Read a SQuAD json file into a list of SquadExample.
Read a SQuAD json file into a list of SquadExample .
"""Read a SQuAD json file into a list of SquadExample."""
input_file
is_training