tatk.nlu.jointBERT.multiwoz package¶
Submodules¶
tatk.nlu.jointBERT.multiwoz.nlu module¶
-
class
tatk.nlu.jointBERT.multiwoz.nlu.BERTNLU(mode, config_file, model_file)¶ Bases:
tatk.nlu.nlu.NLU-
__init__(mode, config_file, model_file)¶ Initialize self. See help(type(self)) for accurate signature.
-
predict(utterance, context=[])¶ Predict the dialog act of a natural language utterance.
- Args:
- utterance (string):
A natural language utterance.
- context (list of string):
Previous utterances.
- Returns:
- action (list of list):
The dialog act of utterance.
-
tatk.nlu.jointBERT.multiwoz.postprocess module¶
-
tatk.nlu.jointBERT.multiwoz.postprocess.calculateF1(predict_golden)¶
-
tatk.nlu.jointBERT.multiwoz.postprocess.intent2triples(intent_seq)¶
-
tatk.nlu.jointBERT.multiwoz.postprocess.is_slot_da(da)¶
-
tatk.nlu.jointBERT.multiwoz.postprocess.recover_intent(dataloader, intent_logits, tag_logits, tag_mask_tensor, ori_word_seq, new2ori)¶
-
tatk.nlu.jointBERT.multiwoz.postprocess.tag2triples(word_seq, tag_seq)¶