wit icon indicating copy to clipboard operation
wit copied to clipboard

Nesting not happening in "free-text" entity

Open M3Z47 opened this issue 2 years ago • 6 comments

Do you want to request a feature, report a bug, or ask a question about wit? Bug

What is the current behavior? There is no composite entities formation (nesting) when I use "freetext" entity. It works in another app, where same entity is used as "free text or keyword".

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

What is the expected behavior? There should be nesting of entities as trained.

If applicable, what is the App ID where you are experiencing this issue? If you do not provide this, we cannot help. 462286775737350

I am sending utterances in the following format through CLI: text: worst bowling average against left hand batsman intent: bowling_average entities: [{'entity': 'stat_type:stat_type', 'start': 0, 'end': 5, 'body': 'worst', 'value': 'worst', 'entities': []}, {'entity': 'stat:required', 'start': 6, 'end': 21, 'body': 'bowling average', 'value': 'bowling average', 'entities': []}, {'entity': 'for_or_against:against_prole_with_dext', 'start': 22, 'end': 47, 'body': 'against left hand batsman', 'value': 'against left hand batsman', 'entities': [{'entity': 'dexterity:dexterity', 'start': 30, 'end': 39, 'body': 'left-handed', 'value': 'left hand', 'entities': []}, {'entity': 'player_role:player_role', 'start': 40, 'end': 47, 'body': 'batsman', 'value': 'batsman', 'entities': []}]}] trait: []

The format is proper when sending this information through API. The entity "for_or_against" is only free-text. The same thing works in different app, where the entity "for_or_against" is "freetext and keyword"

Please help. Thanks.

M3Z47 avatar Jul 14 '22 08:07 M3Z47

In my previous app: 6924265890981719 Client access token: K736DECNSLOFBTM2FR6HNUFFVIMHP5FN (If anyone wants to check) This query is working with proper nesting. Please look into it.

@doggeral

M3Z47 avatar Jul 14 '22 08:07 M3Z47

Is there any formatting issue here? Or nesting can't happen with freetext entities?

M3Z47 avatar Jul 14 '22 08:07 M3Z47

"freetext & keyword" type supports nesting. If you modify the entity "for_or_against" to "freetext & keyword", and annotate a new utterance, the nesting will happen. Any reason why you don't want to use "freetext & keyword"?

ChrisyShine avatar Jul 15 '22 22:07 ChrisyShine

@ChrisyShine

Hello, I used "free text & keyword" earlier, but it used to add gibberish synonyms every time after training in the keywords and detection was not proper in good number of cases. How about this: I make "for_or_against" entity as "free text & keyword" but it should give nested entities, some of which are only free text. Is that possible? e.g. I have an entity: "pt_duo" as free text. It gives player/team name. I want this nested in my "for_or_against" entity. WIll this work? Like :Runs by Virat against Mumbai Indians": Here, against Mumbai Indians should be detected in "for_or_against" with nested entity of "pt_duo" giving "Mumbai Indians" as nested value under it.

M3Z47 avatar Jul 16 '22 00:07 M3Z47

The entity "for_or_against" should be "free text & keyword", and the entities nested to it can be "free text" only.

ChrisyShine avatar Jul 16 '22 00:07 ChrisyShine

Thanks! Will try that now...

M3Z47 avatar Jul 16 '22 01:07 M3Z47

Closing due to no movement on the issue. Please re-open or file a new task should the issue be persisting.

Barbog avatar Apr 18 '23 09:04 Barbog