Semantic Belief Tracking

class semanticbelieftracking.SemanticBeliefTrackingManager.SemanticBeliefTracker(dstring)

The class specifying the interface for all per domain semantic belief trackers.

bootup(previousDomain)

To boot up the semi tracker for the given domain taking into account constraints of previousDomain, this method is called to handle effects internally, e.g., transferring information from one domain to the other.

Should be implemented in a sub-class.

Parameters:previousDomain (str) – the domain identifier string of the previous domain in case there was a domain switch
Returns:a list of constraints
hand_control(previousDomain)

To hand over control from domainString to previousDomainString, this method is called to handle effects internally, e.g., transferring information from one domain to the other.

Should be implemented in a sub-class.

Parameters:previousDomain (str) – the domain identifier string of the previous domain in case there was a domain switch
Returns:a list of constraints
restart(previousDomainString=None)

Restarts the semantic belief tracker and resets internal variables. If special handling is required if a domain switch has occurred, this method should be overridden in a sub-class.

Parameters:previousDomainString (str) – the domain identifier string of the previous domain, obtional, default None
Returns:None
update_belief_state(ASR_obs, sys_act, constraints, turn=None, hub_id=None)

Updates the belief state based on the given input.

Should be implemented in a sub-class.

Parameters:
  • ASR_obs (list) – the list of ASR hypotheses
  • sys_act (str ?) – the last system act (necessary for deriving context information)
  • constraints (list) – internal constraints derived from previous domain in case of domain switch
  • turn (int) – the current turn number
  • hub_id (string) – the hub id (identifying texthub vs. simulate vs. dialogue server)
Returns:

the updated belief state and the last semantic hypotheses if present, otherwise empty list

class semanticbelieftracking.SemanticBeliefTrackingManager.SemanticBeliefTrackingManager

The semantic belief tracking manager manages the semantic belief trackers for all domains. A semantic belief tracker is a mapping from words/ASR input to belief state.

Its main interface method is update_belief_state() which updates and returns the internal belief state on given input.

Internally, a dictionary is maintained which maps each domain to a SemanticBeliefTracker object which handles the actual belief tracking.

_load_domains_semantic_belief_tracker(domainString)
bootup(domainString, previousDomainString=None)

Loads a semi belief tracker for a given domain.

Parameters:
  • domainString (str) – the domain identifier string
  • previousDomainString (str) – the domain identifier string of the previous domain in case there was a domain switch, optional
Returns:

None

getDomainBelief(operatingDomain)

Returns the belief state of the specified domain.

Parameters:operatingDomain (str) – the domain identifier string
Returns:the belief state of the specified domain
hand_control(domainString, previousDomainString=None)

To hand over control from domainString to previousDomainString, this method is called to handle effects internally, e.g., transferring information from one domain to the other.

Calls SemanticBeliefTracker.hand_control() of the domain domainString and sets the internal constraints accordingly.

Parameters:
  • domainString (str) – the domain identifier string
  • previousDomainString (str) – the domain identifier string of the previous domain in case there was a domain switch, optional
restart()

Restarts all semantic belief trackers of all domains and resets internal variables.

update_belief_state(dstring, ASR_obs, sys_act, turn=None, hub_id=None, sim_lvl='dial_act')

Updates the belief state of the specified domain based on the given input.

Parameters:
  • dstring (str) – the domain identifier string
  • ASR_obs (list) – the list of ASR hypotheses
  • sys_act (str ?) – the last system act (necessary for deriving context information)
  • turn (int) – the current turn number
  • hub_id (string) – the hub id (identifying texthub vs. simulate vs. dialogue server)
Returns:

the updated belief state

ModularSemanticBeliefTraker.py - separate modelling of semantic decoding and belief tracking

Copyright CUED Dialogue Systems Group 2015 - 2017


class semanticbelieftracking.ModularSemanticBeliefTracker.ModularSemanticBeliefTracker(domainString)

This class implements the functionality of the original spoken dialogue systems pipeline where semantic decoding and belief tracking are looked at as two separate problems. Refers all requests to semi.SemI.SemIManager and belieftracking.BeliefTrackingManager.BeliefTrackingManager.