f the array element in array 5-2 is the node number of the parent node. The second array (5-3) identifies the level or tier of the node in the tree graph. Knowing the level of a node in the tree graph expedites the process of path selection. The third array (5-4) identifies nodes that are leaves by “T” or “true” and nodes that are not leaves as “false”.
Each of the recognizable keywords (4-1:4-12) is defined by the language to have possible syntactical relationships with other keywords. Stated alternatively, each keyword (4-1:4-12) could be used with the other keywords, albeit in a limited number of possible combinations. The possible combinations that the keywords (4-1:4-12) that can be used with other keywords is specified and these relationships are representable by the links between the nodes in the tree graph (70) depicted in FIG. 3.
Each keyword (4-1:4-12) can be mapped to one or more nodes of the tree graph (70). Keywords that might be synonyms will be mapped to more than one node.
FIGS. 6, 7 and 8 show a graphical representation of the steps of the preferred method of practicing the invention.
FIG. 6 shows that user input is first requested (6-2). An empty set, Node_Set, (6-3) is created, which in FIGS. 9A, 9B, and 9C is implemented as an associative array. User input is obtained (6-4) and is then processed (6-5) as set forth in FIG. 7 to determine all complete paths through the tree graph of FIG. 3 that can be built from the user input obtained (6-4).
After the user input (6-4) has been processed (6-5) as set forth in FIG. 7, the procedure shown in FIG. 7 returns to the procedure shown in FIG. 6 a list of leaves that each correspond to a complete path. The entries in this list are in descending order according to their probability of being the correct path.
Another quantity returned by the procedure shown in FIG. 7 is the number of paths through the tree graph. This number is denoted in FIG. 6 as Npaths.
The variable I, is a loop counter, initially set to zero (6-6). If Npaths is equal to zero (6-8) no complete path through the tree graph has been identified and additional input is requested from the user (6-10). Any such additional input obtained from the user (6-4) is processed again as set forth in FIG. 7. If Npaths is greater than zero, at least one complete through the tree has been identified and the loop counter I is incremented by one (6-12).
For each complete path, I, the user is prompted (6-14) by a query to the user, to confirm the meaning of his utterance as determined by the system. The user's yes or no response (6-16) to the query is tested (6-18). An affirmative response to the query (6-16) means that the user's utterance has been identified and a contextually coherent response can be effected (6-20) by subsequent processing. A negative user response to the query (6-19) causes the next identified complete path, for I less than or equal to Npaths, to be considered for further processing.
Referring to FIG. 7, the number of keyword candidates not yet processed is determined (7-2). Stated alternatively, a determination of whether or not more keyword candidates exist in the utterance is made (7-2). If there is a keyword candidate in the utterance, it is tested (7-4) against the dictionary shown in FIG. 4 by reference numeral 40 and also shown in FIG. 1 by reference numeral 3-3 to determine if it is a keyword.
If the keyword candidate, T, in an utterance is not a keyword, (7-6) the keyword candidate is discarded and the next keyword candidate input by the utterance is tested (7-4). If the keyword candidate T is a keyword and therefore in the dictionary (40) shown in FIG. 4, the linked list pointed to by the keyword in the associative array (40) is identified and the linked list of nodes Q. By way of example, if the keyword candidate is the keyword “G” in the dictionary (40) “G” points to the linked list 4-26, the first element of which is the node “2”.
Each of the Q nodes is added to the node set, if it is not already present (7-10). For all of the Q nodes, an array NEW[Q] is true and a probability is a