LUIS - Can we use phrases list for new values in the entity type List

爷,独闯天下 提交于 2019-12-10 18:50:06

问题


I'm creating LUIS chat bot app for extracting information regarding a company. For example

"what is the filed_name1 for company Google".

So I'm currently extracting "filed_name1" using "list entity" as the number of fields for a company are limited.

Similarly I'm using List entity for extracting company name.As the company names are also limited as now.

Now i want to handle scenario when a new company name gets added to existing list.

I've tried using "Phrases list" to check if it can handle new names. But it's not working.

I've created phrase list "companyNames" given 3 existing names and one new company name.

Now when i test with the utterance

"what is the field_name3 for company new_company_name

It's not identifying new_company_name as a entity. Even though I've provided it in phrases list along with existing company names.

Note: I'm using List entity for company names instead of simple (ml) entity due to performance reasons. In practicality company names length from 10 char to more 50 chars.

Edited:

Pattern : What is {CompanyFieldName} for company {CompanyName}

Phrases list: Google , Apple , Oracle , Samsung (not in the list entity or utterances)

Sample data format in a table

Once I've trained with first 3 company names with same pattern. I'm testing my app with below utterance with new company name.

"What is the filed_name1 for company Samsung"

It's able to detect field_name1 as an entity but Samsung is not identified in any entity.


回答1:


Now i want to handle scenario when a new company name gets added to existing list.

I've tried using "Phrases list" to check if it can handle new names. But it's not working.

This issue could be covered with the new Patterns feature (using pattern.any).

This feature helps in labeling the noun following a specific pattern. You need not provide the list of the companies.

Create the intent

Then create the entities selecting them as pattern.any entity.

Add the format of pattern in the Pattern's feature:

Train the app.

This is the test result to show how it handles the case without providing examples.

So I'm currently extracting "filed_name1" using "list entity" as the number of fields for a company are limited.

You can still extract "field-name1" using list entity. I just provided an example to show how to handle the case if the list gets longer.

If we create a pattern using patter.any entity. It's not able to distinguish between company name and company code. I'm wondering why the pattern i've created isn't helping.

If the case is having the same pattern for handing both code and name for company name then using list entity is the right option as you are doing. The patterns feature work by firing entity first which in this case are the failure point.

Hope this helps!!



来源:https://stackoverflow.com/questions/50584535/luis-can-we-use-phrases-list-for-new-values-in-the-entity-type-list

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!