tatk.nlu.jointBERT.camrest package¶
Submodules¶
tatk.nlu.jointBERT.camrest.nlu module¶
-
class
tatk.nlu.jointBERT.camrest.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.camrest.postprocess module¶
-
tatk.nlu.jointBERT.camrest.postprocess.calculateF1(predict_golden)¶
-
tatk.nlu.jointBERT.camrest.postprocess.intent2triples(intent_seq)¶
-
tatk.nlu.jointBERT.camrest.postprocess.is_slot_da(da)¶
-
tatk.nlu.jointBERT.camrest.postprocess.recover_intent(dataloader, intent_logits, tag_logits, tag_mask_tensor, ori_word_seq, new2ori)¶
-
tatk.nlu.jointBERT.camrest.postprocess.tag2triples(word_seq, tag_seq)¶
tatk.nlu.jointBERT.camrest.preprocess module¶
-
tatk.nlu.jointBERT.camrest.preprocess.da2triples(dialog_act)¶
-
tatk.nlu.jointBERT.camrest.preprocess.get_idx(phrase, utt)¶
-
tatk.nlu.jointBERT.camrest.preprocess.phrase_idx_utt(phrase, utt)¶
-
tatk.nlu.jointBERT.camrest.preprocess.phrase_in_utt(phrase, utt)¶
-
tatk.nlu.jointBERT.camrest.preprocess.preprocess(mode)¶
-
tatk.nlu.jointBERT.camrest.preprocess.read_zipped_json(filepath, filename)¶