0
votes

So I got a bot built with Microsoft Bot Framework and it's using the LUIS API for text recognition. With this bot, I'm able to ask about information about different devices that I got in my backend. They got names like Desk, Desk 2 and Phone Booth 4. The first and second name works just fine but whenever I send a name that contains 2 spaces or more, LUIS will fail to recognize it. I have added all the names to a feature list on LUIS but it doesn't seem to do anything. When I'm in the bot code executes the method for that intent, the entity is just null whenever I send this kind of names. Any idea how I might solve this? As I described, names with just one space like Desk 2 works just fine. Maybe there is a way to save multiple words as an entity inside LUIS?

In the image below, the top entry is "show me phone booth 4" and the bottom one "show me desk 2".

enter image description here

1

1 Answers

0
votes

It'll take a little leg work, but have you tried updating your model programmatically?

On the LUIS API reference, you can label individual utterances or do it in batches. The benefit of doing it this way is that you can select what should be recognized as an entity based on index position.

Example:

{
    "text": "Book me a flight from Cairo to Redmond next Thursday",
    "intentName": "BookFlight",
    "entityLabels":
    [
        {
            "entityName": "Location::From",
            "startCharIndex": 22,
            "endCharIndex": 26
        },
        {
            "entityName": "Location::To",
            "startCharIndex": 31,
            "endCharIndex": 37
        }
    ]
}

I admit I haven't attempted to do this before, but I do not see how labeling/training this way would logically fail.


One thing I do note about your entities is that they're composed of an item and also a number. You could throw them into a composite entity; but in this case doing it the way I mentioned above is a good way to do what you're looking for.

That said, if you plan on using the office-furniture-pieces(?) as entities for a separate intent, say, 'PurchaseNewOfficePieces', it might pay to create use a composite entity for 'Desk 2' and 'Phone Booth 4'.