eta.transducers.base.AffectTransducer

class AffectTransducer[source]

Bases: Transducer

Maps the word content of an utterance to an appropriate affect, given a conversation history.

Parameters:
  • words (str) – The words to match to an appropriate affect.

  • conversation_log (list[DialogueTurn]) – The conversation history to use as context for affect detection.

Returns:

A list of affects.

Return type:

list[str]

Methods

cost

Report cumulative costs of applying this transducer.

__call__(words, conversation_log)[source]

Map from input(s) to output.

cost()

Report cumulative costs of applying this transducer.