microsoft / task_oriented_dialogue_as_dataflow_synthesis

Code to reproduce experiments in the paper "Task-Oriented Dialogue as Dataflow Synthesis" (TACL 2020).
MIT License
304 stars 66 forks source link

What are the entities@ ? #25

Open dnaihao opened 3 years ago

dnaihao commented 3 years ago

I noticed that in the omnt text data created, there are entity@ in the input tokens. E.g.

__User What time is my appointment with Jerri Skinner on Friday? __StartOfProgram ( Yield :output ( :start ( singleton ( :results ( FindEventWrapperWithDefaults :constraint ( EventOnDate :date ( NextDOW :dow # ( DayOfWeek " FRIDAY " ) ) :event ( Constraint[Event] :attendees ( AttendeeListHasRecipientConstraint :recipientConstraint ( RecipientWithNameLike :constraint ( Constraint[Recipient] ) :name # ( PersonName " Jerri Skinner " ) ) ) ) ) ) ) ) ) ) entity@824743096 __User Can you add an appointment with Jerri Skinner at 9 am? __StartOfProgram

But it seems there is no explanation for entity@. Could you provide an explanation for that?

hao-fang commented 3 years ago

Yes, this is noted in Step 3 of the "SMCalFlow Experiments" section in the README.md.

We use --include_described_entities to add the entities (e.g., entity@123456) described in the generation outcome for the context turns. These entities mentioned in the context turns can appear in the "inlined" programs for the current turn, and thus, we include them in the source sequence so that the seq2seq model can produce such tokens via a copy mechanism.

Does this answer your question?

dnaihao commented 3 years ago

Thanks for the information! But what about the number after the symbol @? Is there a pattern for that?

hao-fang commented 3 years ago

The number after the symbol is some hash code of the entity object. There is no guaranteed pattern for it.

dnaihao commented 3 years ago

Thanks for the explanation! Can you provide the corresponding tables for those symbols and the entity object? By the way, is there a list of functions such as "toHour", etc provided?