Thursday, 21 May 2009

Multiple processing stages in dialogue top-level

When building dialogue applications, it's quite often the case that there are multiple stages in the process of converting the LF (the thing that comes out of the recognizer) into a dialogue move. I've just added some hooks so that you can pass back the intermediate levels of representation as an optional extra argument to lf_to_dialogue_move, and display them. This is useful for debugging.

Here's a text example from SHRD2:

>> is the large red block in the box

Old state: []
LF: [[ynq,
[[be, term(the_sing,block,[[size,large],[color,red]]),
Intermediate 1: [[ynq,
scoping_unit(term(event_exists, A,
[[be, A,
term(the_sing, B,
Intermediate 2: [[ynq,
quant(the_sing, A, [[block,A],[size,A,large],[color,A,red]],
quant(the_sing, B, [[box,B]],
quant(event_exists, C,
[[be,C,A,[in_loc,B]],[tense,C,present]], true)))]]
Dialogue move: [[ynq,
quant(the_sing, A, [[block,A],[size,A,big],[color,A,red]],
quant(the_sing, B, [[box,B]],
Abstract action: say(i_dont_understand,present)
Concrete action: tts(sorry, I don't understand)
New state: []

Intermediate 1 is after addition of variables; Intermediate 2 is after scoping; and Dialogue move is after rewriting of lexical predicates. This last step is still very primitive.

No comments: