@mikekgr on this occasion a big list of if, else if statements is probably the best way.
You can use Arduino’s startsWith() function so users don’t have to type in full words etc. Ensuring you keep the keywords unique for startsWith().
If you have 20+ keywords I don’t think allocating numbers will be user friendly.