LUIS closed list entities

偶尔善良 提交于 2019-12-11 04:12:28

问题


I cannot find any documentation or example related to closed list entities. Can someone give a C# example of using closed list entities? Also can you provide a brief explanation when they are useful, please?


回答1:


Here is a link to the new documentation for List Entities. This next link is towards a quick overview of all entity types. This is a link to the API reference that has a good example of a potential use case.

There are a few things to know about List Entities; they're not machine learned, and they're not counted towards your total limit of 30 entities. They have a separate limit, a LUIS model can have up to 50 list entities, each of which will take 20,000 items.

Since they're not machine learned, they're incorporated into the LUIS model through regex. Thus you don't need to provide training utterances for list entities.

Touching back on the API reference's example case, it shows how an entity can have multiple synonyms. E.g. WA and CA mean Washington and California respectively. However, Calif. is also short for California. California Republic could also be used as a synonym for California. (It is on the state flag after all.)

A List Entity improves the accuracy of your LUIS model because as a developer you've provided (potentially) not normally used synonyms of entities.

When using a List Entity, you would use it much in the same fashion as you would any other entity in C# (or Node). You would just need to parse down a little further to extract what you're looking for.

Here's an example of what a List Entity would look like in a response from LUIS.

{
    "entity": "ice cream",
    "type": "Desserts",
    "startIndex": 12,
    "endIndex": 20,
    "resolution": {
        "values": [
            "FrozenDesserts"
        ]
    }
}

The List Entity's name is 'Desserts', and the name of the sub-list is 'FrozenDesserts'. In the example from the API reference, 'FrozenDesserts' would be 'California' which is the 'canonicalForm' that we're looking for.



来源:https://stackoverflow.com/questions/43358558/luis-closed-list-entities

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