microsoft / Cognitive-LUIS-Windows

Windows (.Net) SDK for the Microsoft Language Understanding Intelligent Service API, part of Congitive Services
www.microsoft.com/cognitive-services/en-us/language-understanding-intelligent-service-luis
Other
134 stars 78 forks source link

Can LUIS handle '#'? #88

Closed zanechua closed 5 years ago

zanechua commented 5 years ago

Trying to see if LUIS can handle the special character '#' but it doesn't even seem to be showing up in the LUIS endpoint utterances

stevkan commented 5 years ago

@zanechua, the "#" (hash) character is typically read as an anchor element in the path of a URL. As such, you need to escape the hash as "%23" for LUIS to read it as the special character. For example,

https://{region}.api.cognitive.microsoft.com/luis/v2.0/apps/{appId}?subscription-key={subscriptionKey}&timezoneOffset=-360&q=%23vegas having a lot of fun

resolves to

https://{region}.api.cognitive.microsoft.com/luis/v2.0/apps/{appId}?subscription-key={subscriptionKey}&timezoneOffset=-360&q=%23vegas%20having%20a%20lot%20of%20fun

resulting in the following: image

In this case, I'm using a pattern set as: image

zanechua commented 5 years ago

Ah. Thanks! I guess it makes sense to use the encoded version of it.

Yeah. That's my intended use case as well