0

I have a list of commands like:

1: "Open an employee card *"    
2: "Open site *"

I want there to be a function that I can pass "Open Fred Harvard" into and it would return for example: {"cmd": 1, "arguments": ["Fred Harvard"]}.

There was a library for fuzzywuzzy implicit comparison. It did a similar action, but without arguments, i.e. there was no part in the text that could be arbitrary and needed to be returned.

Maybe there are libraries that can do this, or how can this be done based on fuzzywuzzy, or how can I do it myself?

This is necessary because recognition is not perfect.

A simple regular expression will not do, because there may be errors in the commands.

Doumor
  • 447
  • 3
  • 11

0 Answers0