Multiple Entity

Hi! So I created a nlu data file for bot which can tell if certain people are online in my app. Keeping the api process aside, the problem is that when I train " Is Mathew online today?" I’m taking Mathew as a “name” entity and “today” as a timeline and even “online” as present(because i have different dictionary for online and offline). So this creates 3 entities in a single statement. But when i run it only recognise 2 entity which is “today” and “online” (attendance is just the value i have given leave that).

result- “is Amjad online today”

‘intent’: {‘name’: ‘inform’, ‘confidence’: 0.9483149647712708}, ‘entities’: [{’ start’: 9, ‘end’: 15, ‘value’: ‘Attendance’, ‘entity’: ‘online’, ‘confidence’: 0 .6172609557439037, ‘extractor’: ‘ner_crf’, ‘processors’: [‘ner_synonyms’]}, {‘st art’: 16, ‘end’: 21, ‘value’: ‘today’, ‘entity’: ‘timeline’, ‘confidence’: 0.942 4318413009072, ‘extractor’: ‘ner_crf’}], ‘intent_ranking’: [{‘name’: ‘inform’, ’ confidence’: 0.9483149647712708}, {‘name’: ‘greet’, ‘confidence’: 0.078276738524 43695}, {‘name’: ‘thanks’, ‘confidence’: 0.039875105023384094}, {‘name’: ‘goodby e’, ‘confidence’: 0.0}, {‘name’: ‘inform_p’, ‘confidence’: 0.0}], ‘text’: ‘is Am jad online today?’}

@Akshit Do you really need online/offline to be an entity? Just by thinking about the logic of such bot, you would probably use the name of the user and a date to check if there any records of login for the user in the database or dictionary that you get (or check in tow different dictionaries you have). In that case, online/offline is not really a helpful entity especially if you would do the same check for both cases. You would have an intent for such questions something like ‘is online’ and extract entities ‘name’ and the check if a person is online of offline would simply happen in a custom action.

Difficult to say why the name doesn’t get extracted originally - chanes are, the aren’t enough training examples to ectract three entities from such short inputs.

1 Like

Oh i get what you are saying! So help me with this too…just consider there are stages in a customers type like visited, converted, followed up etc so if the question is

“how many leads are converted today?” (basically lead is a potential customer which can be converted to a actual client)

so what should be the entities in this question? Should i take “lead_type”= created or anything and “timeline” as today,yesterday etc? But i have given “lead” as an entity lead which i think is not required right?

@Akshit What does start and end mean in entities?

it’s just the index value of the entity. like “how are you today” lets say entity = “how” so start = 0 and end = 2 similarly for all entity in a text.

1 Like