(context, query)
| 47 | |
| 48 | |
| 49 | def get_inputs(context, query): |
| 50 | cw, cc = preprocess(context) |
| 51 | qw, qc = preprocess(query) |
| 52 | |
| 53 | context_word_func = get_map_func("CategoryMapper_4.json") |
| 54 | context_char_func = get_map_func("CategoryMapper_5.json") |
| 55 | query_word_func = get_map_func("CategoryMapper_6.json") |
| 56 | query_char_func = get_map_func("CategoryMapper_7.json") |
| 57 | |
| 58 | cw_input = context_word_func(cw).astype(trt.nptype(trt.int32)).ravel() |
| 59 | cc_input = context_char_func(cc).astype(trt.nptype(trt.int32)).ravel() |
| 60 | qw_input = query_word_func(qw).astype(trt.nptype(trt.int32)).ravel() |
| 61 | qc_input = query_char_func(qc).astype(trt.nptype(trt.int32)).ravel() |
| 62 | return cw_input, cc_input, qw_input, qc_input |
no test coverage detected