convlab2.nlu.jointBERT.multiwoz package¶
Submodules¶
convlab2.nlu.jointBERT.multiwoz.nlu module¶
-
class
convlab2.nlu.jointBERT.multiwoz.nlu.
BERTNLU
(mode='all', config_file='multiwoz_all_context.json', model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_all_context.zip')¶ Bases:
convlab2.nlu.nlu.NLU
-
predict
(utterance, context=[])¶ Predict the dialog act of a natural language utterance.
- Args:
- utterance (str):
A natural language utterance.
- context (list of str):
Previous utterances.
- Returns:
- action (list of list):
The dialog act of utterance.
-
convlab2.nlu.jointBERT.multiwoz.postprocess module¶
-
convlab2.nlu.jointBERT.multiwoz.postprocess.
calculateF1
(predict_golden)¶
-
convlab2.nlu.jointBERT.multiwoz.postprocess.
intent2triples
(intent_seq)¶
-
convlab2.nlu.jointBERT.multiwoz.postprocess.
is_slot_da
(da)¶
-
convlab2.nlu.jointBERT.multiwoz.postprocess.
recover_intent
(dataloader, intent_logits, tag_logits, tag_mask_tensor, ori_word_seq, new2ori)¶
-
convlab2.nlu.jointBERT.multiwoz.postprocess.
tag2triples
(word_seq, tag_seq)¶
convlab2.nlu.jointBERT.multiwoz.preprocess module¶
-
convlab2.nlu.jointBERT.multiwoz.preprocess.
da2triples
(dialog_act)¶
-
convlab2.nlu.jointBERT.multiwoz.preprocess.
preprocess
(mode)¶
-
convlab2.nlu.jointBERT.multiwoz.preprocess.
read_zipped_json
(filepath, filename)¶