Handling Common Misspellings


Create a topic called arrays to help catch misspellings and alternates of words without having to clutter your script. Don’t forget to Publish your topic.


Use this in its own topic called arrays:

// questions
! array what = what|wat|wut|whats|waht|wahts|wats|wuts|whta|whtas
! array where = where|ware|wear|wheer
! array who = who|whos|whon|whoom|whome|whos|whom|woh
! array why = why|wyh|ayh|ahy|qhy|whys
! array how = how|hwo|hows|ho
// yes & no
! array no = no|uh-uh|nix|nixie|nixy|nixey|n|nope|nay|nah|no way|negative|veto|out of the question|no siree|thumbs down|nahh|na|fat chance
! array yes = yes|ya|yas|ye|y|yea|yeah|ok|okay|okey-dokey|okie-dokie|by all means|affirmative|aye aye|roger|10-4|uh-huh|uh huh|righto|very well|yup|yuppers|right on|ja|jah|surely|sure|mmhmm|amen|totally|yessir
// hello & goodbye
! array hello = hey 👋|👋|hey|hey|heyy|heyyy|heyyyy|heyyyyy|hye|hi|hii|hiii|hiiii|hiiiii|hiiiiii|hiiiiiii|hiiiiiiii|yo|yoo|yooo|yoooo|yooooo|yoooooo|yooooooo|yoooooooo|hello|helloo|hellooo|helloooo|hellerrr|wassup|whats good|wasgood|hows it going|how are you|hola|ello|elo|ey|oy|ay|sup|howdy|greetings|morning
! array bye = bye|buhbye|see you later|ta|tah|adiós|adieu|addio|adeus|goodbye|farewell|arrivederci|ciao|auf wiedersehen|au revoir|bon voyage|sayonara|shalom|totsiens|take care|talk to you later|have a good one|so long|catch you later|peace out


Use an array (or several) in your trigger to catch all the potential values of that array, saving you from having to repeat yourself and simplify your script. Arrays take the format:

! array some_meaningful_name = potential|words|that|will|all|match|this|array

Use them instead of words in your triggers by using the @ symbol. For instance, to use the who and contact arrays above, you would write in your script:

+ @who [*] @contact [*]
- You should contact Jim Joe for this matter — jim@jimsjoe.com

In this example, the trigger that uses arrays will match both the straightforward “who do I contact about this” and the misspelled and more casual “woh should i reach out to for an answer?”

You can always update your arrays topic with more values over time.

Rememeber that // in your script denotes a comment! These are ignored by Dexter.