There are several ways in which you can do that, the simplest would be to reuse a third-party system, such as Google's Dialogflow or Microsoft LUIS.
Direct comparison of the user input and then mapping it to commands is a very difficult and challenging task. If you can handle the operations as intents (which is what most of the NLP systems do) is much simpler and easier.
Most of the NLP systems are free or very cheap in terms of development cost and maintenance.
Dialogflow | Google Cloud[
^]
What is Language Understanding (LUIS)? - Azure Cognitive Services | Microsoft Docs[
^]