eta.transducers.base.ParaphraseTransducer

class ParaphraseTransducer[source]

Bases: Transducer

Maps a gist clause, given a conversation history and relevant knowledge, to a paraphrased response.

Parameters:
  • gist (str) – The gist clause to paraphrase.

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

  • facts_bg (list[Eventuality]) – A list of “background” knowledge to use for paraphrasing, i.e., knowledge that may impact the resulting paraphrase, but may not be directly included in the paraphrased response.

  • facts_fg (list[Eventuality]) – A list of “foreground” knowledge to use for paraphrasing, i.e., knowledge that should be directly included in the paraphrased response.

Returns:

A list of paraphrased responses.

Return type:

list[str]

Methods

cost

Report cumulative costs of applying this transducer.

__call__(gist, conversation_log, facts_bg, facts_fg)[source]

Map from input(s) to output.

cost()

Report cumulative costs of applying this transducer.