3

I have simple ask, how do I create a Amazon Lex slot for Alphanumeric values.

So far I have tried -

  • AMAZON.Number: only takes decimal numbers
  • AMAZON.PostalAdress: takes everything except numbers
  • Custom Slot with no values: Only numbers

Is there any way to create a slot which takes alphanumeric values?

Thanks

Gaurav Mathur
  • 804
  • 5
  • 14

2 Answers2

1

You can use a custom slot type.

Remember you don't need to enumerate all possible values, just provide enough training data so patterns match. Try giving it around 20-30 values and see if that's enough to train the slot type.

imTachu
  • 3,759
  • 4
  • 29
  • 56
  • 1
    I tried that but the issue is, it learns the pattern. For example - adding "a1b" and combinations matches anything with first character second digit and third character BUT it does not match first character second character and third number or a string with more then 3 characters, like, "cf22". Writing all combinations for infinite length is practically impossible. – Gaurav Mathur Jul 18 '17 at 02:36
0

There is no particular datatype to take alphanumberic values.

AMAZON.NUMBER: accepts only numbers

AMAZON.US_FIRST_NAME: accepts only letters

As part of creating a chatbot in Amazon Lex, I have used AMAZON.Movie to accept both letters and numbers(alphanumberic values) it worked for me. As movie name can have alphanumberic values (Ex: The Incredibles2). I hope it works for you too.