You could use $regex to make it significantly shorter (and decrease processing time... I think?).
var %wordlist = word1|word2|word3
if ($regex($1-,%wordlist) > 0) { do things }
But you need to use some metacharacters to ignore case sensitivity and other stuff. I'm not sure what the full $regex would have to look like.