mlehman / nlp-intent-toolkit

Intent recognition with OpenNLP
The Unlicense
155 stars 51 forks source link

Can only use one entity type #8

Closed jasoncartercs closed 6 years ago

jasoncartercs commented 6 years ago

When I add multiple entity types, the output is incorrect.

For example, if I ask "do you accept cigna?"

The output is like this: { action: 'payment', args: { service_offered: 'cigna' insurance_company: 'cigna' form_of_payment: 'cigna' lender: 'cigna' } }

I would expect this output: { action: 'payment', args: { insurance_company: 'cigna' } }

mlehman commented 6 years ago

Hi Jason, in this example, the "entity" is being used for the name of the slot. So within an intent, the slot should have the same label. It could be different between intents. It would be interesting to try to extend the example to do both slot and entity recognition together. You could also consider leveraging the probabilities from NameFinderME.