Anaphoras

An anaphora is defined as “the use of a word such as a pronoun that has the same reference as a word previously used in the same discourse” (from dictionary.com  ).

An anaphora often occurs in dialogs and makes it difficult to understand what the user means. For example, consider the following phrases:

  • “Find a map of Montreal”
  • “Find me a restaurant there”

In this example, “there” is an anaphora for “Montreal”.

  • “Find Bob’s phone number”
  • “Send him the message: I’m on my way”

In this example, “him” is an anaphora for “Bob”.

Tagging anaphoras

In Mix.nlu, you can:

  • Define how entities may be referred to, for example, whether they are referring a person (Contact, “him”) or a place (City, “there”).
  • Annotate samples that contain anaphoras, such as “Call him” or “Drive there”.

This will help your dialog application determine to which entity the anaphora refers, based on the data it has, and internally replace the anaphora with the value to which it refers. For example, “Drive there” would be interpreted as “Drive to Montreal”.

The four types of anaphora entities are:

  • REF_PERSON: References a person. For example, “him”, “her”, “them”.
  • REF_PLACE: References a place. For example, “there”, “here”, “that place”.
  • REF_THING: References a thing. For example, “it”.
  • REF_MOMENT: References a time. For example, “then”, “at that time”.

Identify an entity as referable

First, you want to identify the entity as referable.

  1. In the Entities area of the Develop tab, select the entity.
  2. In the Referenced as field, select the correct anaphora type for this entity. For example, for a location, select REF_PLACE:

Anaphora entity

Annotate a sample containing an anaphora

Once the entity has been identified as referable, you can annotate a sample containing an anaphora reference to that entity.

  1. In the Develop tab, open the intent containing the sample.

  2. Locate the sample containing an anaphora reference to the referable entity, and click the reference word.

    Anaphora click reference

  3. An entity selector menu will open. You should see as options both the referable entity, as well as the corresponding anaphora entity type (REF_xxxx) to which the entity is referable. Select the anaphora entity type from the menu.

    Anaphora select type

The sentence is now annotated as containing an anaphora reference.

Anaphora sentence annotated