convlab2.nlu.jointBERT.camrest package

Submodules

convlab2.nlu.jointBERT.camrest.nlu module

class convlab2.nlu.jointBERT.camrest.nlu.BERTNLU(mode, config_file, model_file)

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.camrest.postprocess module

convlab2.nlu.jointBERT.camrest.postprocess.calculateF1(predict_golden)
convlab2.nlu.jointBERT.camrest.postprocess.intent2triples(intent_seq)
convlab2.nlu.jointBERT.camrest.postprocess.is_slot_da(da)
convlab2.nlu.jointBERT.camrest.postprocess.recover_intent(dataloader, intent_logits, tag_logits, tag_mask_tensor, ori_word_seq, new2ori)
convlab2.nlu.jointBERT.camrest.postprocess.tag2triples(word_seq, tag_seq)

convlab2.nlu.jointBERT.camrest.preprocess module

convlab2.nlu.jointBERT.camrest.preprocess.da2triples(dialog_act)
convlab2.nlu.jointBERT.camrest.preprocess.das2tags(sen, das)
convlab2.nlu.jointBERT.camrest.preprocess.get_idx(phrase, utt)
convlab2.nlu.jointBERT.camrest.preprocess.phrase_idx_utt(phrase, utt)
convlab2.nlu.jointBERT.camrest.preprocess.phrase_in_utt(phrase, utt)
convlab2.nlu.jointBERT.camrest.preprocess.preprocess(mode)
convlab2.nlu.jointBERT.camrest.preprocess.read_zipped_json(filepath, filename)

Module contents