convlab2.nlu package

Subpackages

Submodules

convlab2.nlu.evaluate module

Evaluate NLU models on specified dataset Metric: dataset level Precision/Recall/F1 Usage: python evaluate.py [CrossWOZ|MultiWOZ|Camrest] [BERTNLU|MILU|SVMNLU] [usr|sys|all]

convlab2.nlu.evaluate.calculateF1(predict_golden)

convlab2.nlu.nlu module

Natural Language Understanding Interface.

class convlab2.nlu.nlu.NLU

Bases: convlab2.util.module.Module

NLU module interface.

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.

Module contents