Standard Variables make it easier to use common expressions in your configuration without having to write everything from scratch yourself

`Standard Variables`

are building blocks that make supporting certain common but somewhat complex expressions easier in your configuration. While you could construct these same expressions yourself in SAL, our predefined standard variables let you focus more on the unique aspects of your application.

The Standard Variables look like and are used like normal Variables, but you don’t have to define them in your configuration, because we’ve already done it for you. The Standard Variables can be identified by their names, which start with `SPEECHLY.`

You can see a standard variable being used in the example utterance below, which now permits various ways of expressing dates to be recognized by your application:

```
*book book a flight for $SPEECHLY.DATE(departure)
```

The above *Template* can expand for example to the following (just to name a few):

```
*book book a flight for january fifth twenty twenty one
*book book a flight for tomorrow
*book book a flight for second of november two thousand and twenty one
```

While Standard Variables can be used as such, if they appear as entity values, we also recommend assigning the entity in question the appropriate Data Type.

Standard Variable | Expands to | Examples |
---|---|---|

`$SPEECHLY.DATE` | Date expressions | tomorrow, next Friday, January fifth twenty twenty |

`$SPEECHLY.TIME` | Time expressions | three thirty pm, quarter past eleven, fifteen twenty five |

`$SPEECHLY.NUMBER` | Arbitrary numbers | five million five hundred twenty-eight thousand eight point twelve, minus zero point zero five, eleven thousand |

`$SPEECHLY.CARDINAL_NUMBER` | Arbitrary cardinals | five million five hundred twenty-eight thousand eight, minus three, eleven hundred eleven |

`$SPEECHLY.SMALL_NUMBER` | Small numbers | seventeen point five, minus five |

`$SPEECHLY.SMALL_CARDINAL_NUMBER` | Small cardinal numbers | seventeen, minus five, ninety-five |

`$SPEECHLY.FOUR_DIGIT_NUMBER` | Four digit numbers | five six four nine, one nine eight four |

`$SPEECHLY.POSITIVE_NUMBER` | Positive numbers | eleven hundred eleven, seventeen, five million five hundred |

`$SPEECHLY.NEGATIVE_NUMBER` | Negative numbers | minus five, negative twenty-four |

`$SPEECHLY.SMALL_ORDINAL_NUMBER` | Ordinal numbers 1-31 | first, second, thirty-first |

`$SPEECHLY.IDENTIFIER_SHORT` | 1-4 character identifier | zero zero seven x, alpha dash one, two seven |

`$SPEECHLY.IDENTIFIER_MEDIUM` | 5-8 character identifier | a b one two dash nine x, delta foxtrot five seven dash two |

`$SPEECHLY.IDENTIFIER_LONG` | 9-12 character identifier | one two seven dot zero dot zero dot one slash x y |

`$SPEECHLY.IDENTIFIER` | 1-12 character identifier | two seven, one two seven dot zero dot zero dot one slash x y |

`$SPEECHLY.PHONE_NUMBER` | Phone numbers | plus three five eight four zero one two three four five six, one two three four five six |

`$SPEECHLY.PERSON_NAME` | Person names | amelia m earhart, john smith, _c o n a n o’brien |

`$SPEECHLY.EMAIL_ADDRESS` | Email addresses | hello at speechly dot com, john dot smith at company dot com |

`$SPEECHLY.WEB_ADDRESS` | Website addresses | w w w dot speechly dot com, h t t p s colon slash slash docs dot speechly dot com |

Last updated by Antti Ukkonen on April 12, 2021 at 17:16 +0300

Found an error on our documentation? Please file an issue or make a pull request

Content