Functions | |
def | parse_args () |
def | question_features (tokens, question) |
def | inference (features, tokens) |
def | print_single_query (eval_time_elapsed, prediction, nbest_json) |
Variables | |
def | args = parse_args() |
paragraph_text = None | |
squad_examples = None | |
output_prediction_file = None | |
f = open(args.passage_file, 'r') | |
question_text = None | |
tokenizer = tokenization.FullTokenizer(vocab_file=args.vocab_file, do_lower_case=True) | |
int | doc_stride = 128 |
def | max_seq_length = args.sequence_length |
bert = infer_c.bert_inf(args.engine, 1, max_seq_length, args.enable_graph) | |
all_predictions = collections.OrderedDict() | |
end | |
def | features = question_features(example.doc_tokens, example.question_text) |
eval_time_elapsed | |
prediction | |
nbest_json | |
doc_tokens = dp.convert_doc_tokens(paragraph_text) | |
list | EXIT_CMDS = ["exit", "quit"] |
def inference_c.parse_args | ( | ) |
Parse command line arguments
def inference_c.question_features | ( | tokens, | |
question | |||
) |
def inference_c.inference | ( | features, | |
tokens | |||
) |
def inference_c.print_single_query | ( | eval_time_elapsed, | |
prediction, | |||
nbest_json | |||
) |
def inference_c.args = parse_args() |
string inference_c.paragraph_text = None |
inference_c.squad_examples = None |
def inference_c.output_prediction_file = None |
inference_c.f = open(args.passage_file, 'r') |
string inference_c.question_text = None |
inference_c.tokenizer = tokenization.FullTokenizer(vocab_file=args.vocab_file, do_lower_case=True) |
int inference_c.doc_stride = 128 |
def inference_c.max_seq_length = args.sequence_length |
inference_c.bert = infer_c.bert_inf(args.engine, 1, max_seq_length, args.enable_graph) |
inference_c.all_predictions = collections.OrderedDict() |
inference_c.end |
def inference_c.features = question_features(example.doc_tokens, example.question_text) |
inference_c.eval_time_elapsed |
inference_c.prediction |
inference_c.nbest_json |
inference_c.doc_tokens = dp.convert_doc_tokens(paragraph_text) |
list inference_c.EXIT_CMDS = ["exit", "quit"] |