Saturday, October 20, 2018

LUIS(Language Understanding Intelligent Service) -- Simple and List Entity

LUIS(Language Understanding Intelligent Service) is a Azure-based API for natural language processing. It is very useful and easy to apply conversational system. However, LUIS has so many features and documentation is huge, and sometimes I am lost where to start with it. So, I strongly recommend starting learning basic features, (like Simple Entity, List Entity) and understanding its fundamentals first. Next important thing is where you apply. And then you create suitable utterances and entities for intents. Finally, you can use additional features (like Pattern.any Entity, Hierarchical Entity, Composite Entity, Phrase Pattern, etc.)


Entity
Objective: Understand where key words are located in utterances, and extract key words for intents
Entity types: Simple, List, Composite, Hierarchical, Regex, Pattern.any

There are 6 types of entities. I recommend using only Simple and List in the beginning because they have fundamental functions and the others are additional and difficult effectively to apply.

Simple Entity
Dynamic words which are not fixed. It is predicted by a position in phrases. For example, Entity: Fish includes Fish, Tuna, Herring, or Mackerel. It possibly includes others like Jack Fish or Goosefish which not in the entity. Member of Simple Entity is infinite and dynamic.


List Entity
Static set of words which are fixed. It is not predicted because the word list is fixed and exhaustive. What is the difference from Simple Entity? For example, Entity: Musician includes John Lennon, Paul, Mick Jagger, or any musician. The number is infinite and you cannot list out. On the other hand, Entity: The Beatles member includes only 4. It cannot be added.

Simple Entity example
Here, Simple Entity is musician. Intent is play music. The point is 1) it recognizes the intent even when utterance is "I want to listen to John Lennon" while actual input is "I want to listen to Eric Clapton". 2) It recognizes from None Intent. 3) it predicts new musician entity "Ed Sheeran"when entity is "I want to listen to John Lennon" while actual input is "I want to listen to Ed Sheeran"

List Entity example
List Entity is The Beatles member. Intent is tell me about The Beatles member. The point is it does not predict like Simple Entity for "Ed Sheeran" as The Beatles member when utterance is "I want to listen to John Lennon" while Input is "I want to listen to Ed Sheeran". The Beatles member is only 4 listed in the List Entity.