3

I am developing an Alexa skill, where I have a stop for names of fruits. However, if I speak something like "What is apple's cost" where the slot value has an apostrophe, Alexa does not seem to recognize the apostrophe. Workaround is to say something like "What is the cost of an apple" but that would not be the best customer experience. How can I make Alexa understand slot value with apostrophes? Any help is appreciated.

2 Answers2

3

I think this is what you are looking for.

Create Intents, Utterances, and Slots (Rules for Sample Utterances)

If the word for a slot value may have apostrophes indicating the possessive, or any other similar punctuation (such as periods or hyphens) include those within the brackets defining the slot. Do not add 's after the closing bracket. For example: ...

Pyves
  • 6,333
  • 7
  • 41
  • 59
pip
  • 75
  • 5
0

My friend, the apostrophe could be parsed depending on the voice recognition system internally, but it will never understand in real time an apostrophe.

Good news though, you dont need the apostrophe, think about it, it is only recognizing what the custommer would say without capital letters and special characters. Meaning, if the custommer says "What is apple's cost", alexa would recognize as the following "what is apples cost". This is a problem that should be worked server-side, cause you only need to understand what the custommer meant. You should implement server side a string matching function using levenshtein's algorithm.

Leandro
  • 180
  • 4