wit icon indicating copy to clipboard operation
wit copied to clipboard

Ability to extract multiple entities from the same keyword

Open 91ns opened this issue 8 years ago • 12 comments

If one keyword is trained in multiple entities, is it possible to extract multiple entities for that keyword?

91ns avatar Jul 06 '18 13:07 91ns

This is currently not supported. Can you share concrete examples/more context for this?

Thanks

patapizza avatar Jul 06 '18 14:07 patapizza

For example, Gold is a type of metal, it is also a color. Sometimes, I need to have both entities in the response and decide which one to use based on the context or intent.

But right now, if I was to train Gold as "material_type" and "color", the response will return only one of them.

91ns avatar Jul 06 '18 17:07 91ns

Hi @91ns :-) We used to return only entities that have been validated with a certain intent. We are bringing back this behavior for some beta users, before deploying to more people. Would that fix your issue or do you need something more elaborate?

blandinw avatar Jul 10 '18 22:07 blandinw

@blandinw this will be great actually, thanks a lot.

91ns avatar Jul 11 '18 05:07 91ns

@91ns please provide the app ids you'd like to switch to the new behavior and I'll make the change :-)

blandinw avatar Jul 17 '18 20:07 blandinw

For now let's try with this app 5b0515c8-5c31-4249-8c05-faae08c7465a Thanks a lot @blandinw

91ns avatar Jul 18 '18 05:07 91ns

@91ns I looked more closely at your app, and in this case the "soft intent slots" behavior I described above would not work since the conflicting entities "color" and "material_type" are validated with the same intent "lost" in your dataset. Is this intended?

blandinw avatar Jul 22 '18 19:07 blandinw

Hi,

I have a similar issue and I would also need to get back all the entities that a value belongs to.

Example :

Let's say I have two keyword entities, the countries of EU (countries_EU) and the countries of NATO (countries_NATO) and they both have "Greece" as a value.

Chatbot : Where do you live? User : In Greece.

This could be a form filling chatbot. In that case I would need to get back both entities recognized. I think this is an important feature. Would you consider it for implementation?

fkerasar avatar Aug 22 '18 13:08 fkerasar

@fkerasar thank you for your feedback, it definitely helps us gauge the need for such a feature :)

This difficulty is to know which entities are allowed to be returned together for the same word. A contrived example is "Let's meet at [Noon]", here Noon could be a datetime or a location, but it would probably be incorrect to say it's both simultaneously, so we cannot enable this behavior in a generic fashion.

Ultimately, there may be a perception issue as to what data you should be storing in Wit. Wit tells you that a piece of text is describing the country known as "Greece". The fact that Greece can be a country in Europe, NATO, EU, Schengen, etc. should probably be saved in your business logic, and not in Wit itself. Wit is only concerned with extracting entities from text, and the "data schema" (or ontology) you have in Wit should only cater to this. There is a subtle difference between the two types of data that is negligible in a small app, but starts to show when you're trying to do something more complex.

Note that we do allow each entity value to have metadata attached to it where you can store e.g. a normalized ID to link it to your own database/business logic.

I will close this issue for now, but please feel free to comment back, or if you need the "soft intent slots" behavior described earlier in the thread.

blandinw avatar Aug 24 '18 00:08 blandinw

Hi @blandinw , is it possible to switch my test app to multiple intents also? appid: 2524273854283544

chatbotalex avatar Feb 18 '19 15:02 chatbotalex

Hello @blandinw is it possible to switch my test app to multiple entities also APP ID: 516447745943988

rlakhotiya avatar Mar 16 '20 20:03 rlakhotiya

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