Hi
Let's consider we have a system with 100 commands and we want the system doing something inorder to each command. so we want to assign some action to each command. but how can we do it? the first and simplest idea is using nested if-elseif statement:
But what if our commands are more than 1000 or 10,000? or our system is a dictation system? how can we assing some actions to some commands in fastest way?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Big sequence of ifs is a good approach if your actions are irregular (some open application, others query web). If actions are more regular, you can use a hash table, you first look for an action in hash table, then execute command based on the key value.
More advanced NLP is also possible, like in openephyra.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
Let's consider we have a system with 100 commands and we want the system doing something inorder to each command. so we want to assign some action to each command. but how can we do it? the first and simplest idea is using nested if-elseif statement:
But what if our commands are more than 1000 or 10,000? or our system is a dictation system? how can we assing some actions to some commands in fastest way?
Big sequence of ifs is a good approach if your actions are irregular (some open application, others query web). If actions are more regular, you can use a hash table, you first look for an action in hash table, then execute command based on the key value.
More advanced NLP is also possible, like in openephyra.