Abstract:
A computer tool that induces linguistic rules from particular examples and that can store and utilize these rules. A user of the tool provides examples from which the tool can induce rules, and provides feedback to guide the tool in formulating rules. The tool also can generate, store and utilize synonyms, and can learn to exclude objects from the induction process.

Description:
BACKGROUND OF THE INVENTION 
     Computer-based systems are often controlled by formal languages that are complex and difficult to master. Examples of such languages include database languages such as Dbase and SQL (Structured Query Language), operating system languages such as MS-DOS, UNIX, and VMS, and the command languages of some spreadsheets and word processors. 
     End users of these systems often do not have the specialized training needed to use the formal languages associated with them. Consequently, substantial resources are often expended in the development of human-computer interfaces. A human-computer interface provides the user with access to the functions which the formal language controls, while shielding the user from the complexities of the formal language. 
     The creation of a human-computer interface may be a costly task involving a lengthy design process, often followed by extensive coding of software. There is therefore a benefit to be realized in providing the developers of human-computer interfaces with tools that allow them to rapidly create interfaces. 
     SUMMARY OF THE INVENTION 
     A tool that induces linguistic rules from particular examples, and that can store and utilize these rules, is disclosed herein. A user of the tool only needs to provide examples from which the tool can induce rules, and provide feedback to guide the tool in formulating rules appropriately. The tool can also generate, store, and utilize synonyms. By tracking a user&#39;s interaction with it, the tool can learn to exclude objects from the process of induction. Rules, synonyms, and objects are described below. 
     An application of the disclosed invention is to rapidly create human-computer interfaces, where the interfaces so derived are based on a collection of rules and synonyms generated with the disclosed invention. When using such an interface, the end user may use expressions in his or her own native language, or in a professional jargon or personal slang, to access the computer system, instead of having to use the underlying formal language(s). 
     An underlying formal language addressed by the disclosed invention could be a human language such as English or French expressed by a formal grammar or other symbolic representation and processed by a computer in the same sense that Fortran or SQL are processed. In this case the disclosed invention could be used to extend the underlying formal (human) language by adding new rules and synonyms or to generate a translation facility by adding rules and synonyms that map to the underlying formal  (human) language from some other human language(s). 
    
    
     DESCRIPTION OF THE DRAWINGS 
     The invention will be more fully understood from the following detailed description, taken in conjunction with the accompanying drawings, in which: 
     FIG. 1 is a flow diagram depicting the sequence of operations of a computer system operated in accordance with the present invention; 
     FIG. 2 is a flow diagram depicting the sequence of operations to obtain an input; 
     FIG. 3 is a flow diagram depicting the sequence of operations to parse an input; 
     FIG. 4 is a flow diagram depicting the sequence of operations occurring during induction; and 
     FIG. 5 is a flow diagram depicting the sequence of operations to exclude objects from induction. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     The language learning shell disclosed herein provides a mechanism that is able to generate, store and utilize rules and synonyms. A rule establishes a correspondence between a class of linguistic expressions having arbitrary structure, and a class of transactions in one or more formally described languages (possibly extended by previously created rules). A synonym establishes a correspondence between two arbitrary expressions. 
     For purposes of understanding the present invention, reference is made to an embodiment, the source code for which is attached hereto, which embodiment is a tool enabling the creation of human-computer interfaces to the SQL (Structured Query Language) database language. It will be readily apparent to one skilled in the art that the present invention will work with languages other than SQL, and need not be limited to the disclosed embodiment. In the course of the discussion below, certain formalisms, data structures, and subject matter will be referenced so as to make the exposition more concrete. It will be readily apparent to one skilled in the art that other formalisms, data structures, and subject matter could equally well serve to exemplify the mechanisms described herein. 
     The invention disclosed herein generates rules and synonyms from examples. An example, for the purposes of the present invention, is a pair of the form, X→Y. The arrow (→) is interpreted as &#34;means&#34; or &#34;implies.&#34; The first member of the pair, X, will be referred to as the &#34;left-member&#34; of the pair, and the second member, Y, will be referred to as the &#34;right-member.&#34; 
     A system that derives generalizations from examples is said to exhibit &#34;example-based learning.&#34; Typical examples, involving textual inputs, are the following: 
     1) arrival time 
     →arr 13  time; 
     2) what is the arrival time of flight 222 
     →select arr --  time from flights where flight 222; or 
     3) show cost 345 
     →what is the cost of flight 345. 
     Example (1) could establish an equivalence between &#34;arrival time,&#34; an English phrase, and &#34;arr --  time,&#34; the name of a column in a database. This example could lead to the creation of a synonym. 
     Examples (2) and (3) could lead to the creation of rules. In example (2), for instance, the first member of the pair is an ordinary English expression, and the second member of the pair is a statement in the database language SQL, the literal meaning of which is: given a table called &#34;flights&#34; with columns &#34;arr --  time&#34; and &#34;flight,&#34; retrieve the contents of the &#34;arr --  column for all records where the &#34;flight&#34; column takes the value 222. In this example, the SQL statement is, in the context of querying a database, equivalent to, or implied by, the English expression. Example (3) establishes an equivalence between a terse English expression and a lengthier and clearer expression in English. 
     These three examples could be supplied in the course of a dialogue between a computer program and its environment, whether a human user, a file, another program, or a device of some kind. A dialogue can be defined as the sequence of steps necessary to obtain an input from the environment, react to the input, obtain another input, react, and so on, until an input is received indicating that the dialogue shall terminate. 
     FIG. 1 is a flow diagram depicting the dialogue carried out by a computer system operated in accordance with the present invention. In the course of the actual operation of the sequence shown in FIG. 1, messages and displays may be presented to a user so as to keep the user informed and/or to elicit a response from the user. 
     With reference to FIG. 1, following a &#34;Begin&#34; step 10, an input X is obtained at step 20. The sequence of steps necessary to obtain an input at step 20 are shown in more detail in FIG. 2. 
     As shown in FIG. 2, obtaining an input involves three operations: reading the input, tokenizing it, and preprocessing it. During the read operation 22, the raw material of the input is acquired. For example, if the input is textual, reading the input may mean acquiring a string of characters. If the input is graphical, reading the input may mean acquiring an array of pixels. Similar comments apply to acoustic, video, and multimedia inputs. 
     After the input is read, it is segmented into the smallest meaningful units that are relevant for subsequent processing, during step 24. This step, known as tokenization, results in a collection of items, called &#34;tokens.&#34; In the disclosed embodiment, for example, tokenization of text yields a list of tokens, where a token can be an individual punctuation or space character, or a sequence of alphabetic or numeric characters. In the course of tokenizing, irrelevant material, such as white space beginning or terminating an input, may be discarded. 
     The pairs shown in Examples (1), (2) and (3), above, with their members tokenized by the disclosed embodiment, would appear as follows: 
     (4) [$arrival$, $ $, $time$] 
     →[$arr$, $ 13  $, $time$]; 
     (5) [$what$, $ $, $is$, $ $, $the$, $ $, $arrival$, $ $, $time$, $ $, $of$, $ $, $flight$, $ $, $222$] 
     →[$select$, $ $, $arr$, $ --  $, $time$, $ $, $from$, $ $, $flights$, $ $, $where$, $ $, $flight$, $ $, $=$, $ $, $222$, $;$]; and 
     (6) [$show$, $ $, $cost$, $ $, $345$] 
     →[$what$, $ $, $is$, $ $, $the$, $ $, $cost$, $ $, $of$, $ $, $flight$, $ $, $345$]. 
     As can be seen in (4), (5) and (6), a list, in the disclosed embodiment, is delimited by square brackets, and its members are separated by commas. Tokens, in the disclosed embodiment, consist of character strings delimited by dollar signs. 
     After tokenization, the input is preprocessed during step 26, so as to transform the input according to the synonyms stored in the system. A synonym is a pair of the form, X→Y, where X and Y are collections of tokens. 
     In the present invention, during preprocessing, the tokenized input is scanned and, whenever the left-member of a synonym is encountered, it is replaced by the right-member. For example, if the tokenized pair shown in (4) is stored as a synonym in the system, then the result of preprocessing: 
     [$what$, $ $, $is$, $ $, $the$, $ $, $arrival$, $ $, $time$, $ $, $of$, $ $, $flight$, $ $, $222$] 
     is the following: 
     [$what$, $ $, $is$, $ $, $the$, $ $, $arr$, $ --  $, $time$, $ $, $of$, $ $, $flight$, $ $, $222$]. 
     The sequence &#34;$arrival$, $ $, $time$&#34; is transformed by preprocessing to &#34;$arr$, $ --  $, $time$&#34;. 
     In scanning a tokenized input, two or more synonyms may be applicable at a given point. In this case, the system determines which synonym to apply. This determination is called &#34;disambiguation of synonyms.&#34; The term &#34;disambiguation&#34; is standard in computational linguistics and will be familiar to one skilled in the art. 
     To disambiguate, a measure of length is computed for the left-member of each synonym. In the disclosed embodiment, the length of the left-member of a synonym is computed as the number of tokens making up the left-member. If two or more synonyms can be applied, the synonym whose left-member has the greatest length is preferred. With textual inputs, if the left-member of a synonym represents a contiguous sequence of tokens, this method will yield a unique solution. In other cases, it may be desired to apply additional criteria to achieve complete disambiguation. 
     Preprocessing can be recursive in the sense that when the right-member of a synonym is substituted for the left-member, the right-member may itself be subsequently transformed according to the synonyms stored in the system. Preprocessing can be multi-pass in the sense that the entire input, once preprocessed as described, is subjected to additional preprocessing until some criterion is satisfied. 
     Returning to FIG. 1, after input X is obtained during step 20, the input is tested at step 30, to see if it is an instruction to end. If X is an instruction to end, control is transferred to the &#34;End&#34; mechanism 32, which performs such items as saving information to disk. 
     If the X input is not an end instruction, then at step 40 the system determines whether to begin processing. In some applications, there will be inputs that, under appropriate conditions, cause control to be transferred to the processing stage 45 at this point. If X is such an input, control is transferred, as shown in FIG. 1. The mechanism for processing input X will depend on the application. Following processing, control is returned to step 20 and a new input is obtained. 
     If step 40, &#34;begin processing,&#34; yields a negative result, control is transferred to step 50, where it is determined whether input X can be parsed. An input can be parsed if it can be subdivided into one or more statements, and each statement can be parsed. A statement can be parsed if it is an instance of one of the underlying formal languages, or if it is an instance of one of the rules stored in the system. 
     FIG. 3 shows, in more detail, the sequence of steps which occur during step 50, to determine whether X can be parsed. During step 51, labeled &#34;X=S-Formal+X&#39;&#34;, it is determined whether X can be decomposed into a statement S-Formal, and other material X&#39;, where S-Formal is an instance of one of the underlying formal languages. Various methods, familiar to one skilled in the art, are available for making this determination. 
     If &#34;X=S-Formal+X&#39;&#34; succeeds, control is transferred to step 52, labeled &#34;Parse S-Formal.&#34; Parsing transforms S-Formal into a sequence of tokens and objects. An object is a pair comprising a referent and a datatype, and may include other material as well. The referent is a collection of tokens. A datatype is a category used in the underlying formal language of which S-Formal is an instance. 
     To illustrate the transformation of S-Formal into a list of tokens and objects, it may be helpful to refer to the tokenized SQL statement which is the right-member of (5): 
     (7) [$select$, $ $, $arr$, $ --  $, $time$, $ $, $from$, $ $, $flights$, $ $, $where$, $ $, $flight$, $ $, $=$, $ $, $222$, $;$]. 
     In the disclosed embodiment, parsing this input would yield the following list of tokens and objects: 
     (8) [$select$, $ $, ([$arr$, $ --  $, $time$], column), $ $, $from$, $ $, ([$flights$], table), $ $, $where$, $ $, ([$flight$], column), $ $, $=$, $ $, ([$222$], number), $;$]. 
     The four objects in the above list are ([$arr$, $ --  $, $time$], column); ([$flights$], table); ([$flight$], column); and ([$222$], number). A pair, in the disclosed embodiment, is delimited by parentheses, and its members are separated by a comma. The datatypes &#34;column,&#34; &#34;number,&#34; and &#34;table&#34; are used in the SQL database language. While objects are shown above as a referent followed by a datatype, the opposite order could serve equally well. Methods that can be used to transform a tokenized statement of a formal language into a list of tokens and objects will be familiar to one skilled in the art. 
     Steps 51 and 52 are shown as distinct in FIG. 3. This distinction is made so as to enhance the clarity of the discussion. In the disclosed embodiment, the decomposition of X into S-Formal and X&#39;, and the parsing of S-Formal, are carried out as a single process. This is also true in the disclosed embodiment regarding the steps 53 and 54. 
     Steps 51 and 52 are both nondeterministic. That is, there may be more than one decomposition of X into an S-Formal and an X&#39;, and given a particular decomposition of X into S-Formal and X&#39;, there may be more than one way that S-Formal can be parsed by the underlying formal language(s). 
     Multiple parses of S-Formal are possible if there is more than one way for S-Formal to be parsed by an underlying formal language. Multiple parses are also possible if there are two or more underlying formal languages, and S-Formal can be parsed by more than one of them. 
     The terms &#34;nondeterminism&#34; and &#34;nondeterministic&#34; are used in the sense familiar to one skilled in the art. It is possible to implement the present invention so that nondeterminism is eliminated from any of the nondeterministic mechanisms mentioned in the present description. 
     Following step 52, step 55, labeled &#34;X&#39; terminal,&#34; is executed. If X&#39; is empty or constitutes material that indicates that parsing should terminate, then control is transferred to step 56, labeled &#34;Succeed.&#34; If &#34;X&#39; terminal&#34; yields a negative result, control is transferred to step 57, labeled &#34;X&#39; can be parsed.&#34; The mechanism of step 57 is the same as the overall mechanism 50 shown in FIG. 3, which means that the mechanism of FIG. 3 is formally recursive. 
     If step 57 yields a positive result, then control is transferred to step 56. Otherwise, control is transferred to step 58 labeled &#34;Backtrack,&#34; which is described below. 
     If the step 51 test &#34;X=S-Formal+X&#39;&#34; fails, then control is transferred to step 53, labeled &#34;X=S-Rule+X&#39;&#34;. At this step, a test is applied to determine whether X can be decomposed into S-Rule, and some other material X&#39;, where S-Rule is an instance of a rule. 
     Rules that could be generated by the disclosed embodiment from two of the examples provided earlier would be the following: 
     (9) [$what$, $ $, $is$, $ $, $the$, $ $, (1, column), $ $, $of$, $ $, $flight$, $ $, (2, number)] 
     →[[$select$, $ $, (1, column), $ $, $from$, $ $, $flights$, $ $, $where$, $ $, $flight$, $ $, $=$, $ $, (2, number), $;$]]; 
     (10) [$show$, $ $, (1, column), $ $, (2, number)]→[[$what$, $ $, $is$, $ $, $the$, $ $, (1, column), $ $, $of$, $ $, $flight$, $ $, (2, number)]]. 
     In these rules, the left-member is a list of tokens and slots; the right-member is a list of lists of tokens and slots. 
     A slot, in (9) and (10), is a pair consisting of an index and a datatype. More generally, a slot is a structure that indicates that material of a given datatype can occur at a given location. It contains an index, a datatype, and possibly other material as well. The index can be an integer, or a member of some enumerable set. The datatype is a category meaningful in one of the underlying formal languages. While slots are shown above as an index followed by a datatype, the opposite order could serve equally well. 
     The reason the right-member, in (9) and (10), is a list of lists, is that the right member of a rule can derive from a collection of statements. In the disclosed embodiment, each statement contributes a list of tokens and slots to the right-member. 
     The representation of rules illustrated and described above is not the only one that could be utilized with the present invention. In general, a rule is a pair whose left-member consists of a template, and whose right member is a collection of one or more templates. A template is a collection of tokens, slots, and possibly additional material. A rule can contain additional material. In the disclosed embodiment, for example, a rule also contains measures of its length and generality, as well as other information. The measures of length and generality are used in the disambiguation of rules, described below. 
     An instance of a rule is a collection of tokens that can be realized by substituting for each slot in the left-member of the rule a set of tokens conforming to the datatype of the slot. For example, the following constitutes an instance of the rule shown in (9): 
     (11) [$what$, $ $, $is$, $ $, $the$, $ $, $dep$, $ --  $, $time$, $ $, $of$, $ $, $flight$, $ $, $999$]. 
     The tokens &#34;$dep$, $ --  $, $time$&#34; are the tokenized form of a syntactically correct expression for a column. The token &#34;$999$&#34; is the tokenized form of a syntactically correct expression for a number. If, in the rule in (9), the slot &#34;(1, column)&#34; is replaced by &#34;$dep$, $ --  $, $time$&#34; and the slot &#34;(2, number)&#34; is replaced by &#34;$999$&#34;, then the left member of the rule becomes identical to the above list, from which it follows that the list is an instance of the rule. Methods for determining whether a collection of tokens constitutes an instance of a rule will be familiar to one skilled in the art. 
     If a statement is an instance of one of the rules stored in the system, then it is possible that it is an instance of other rules as well. Therefore, there should be a way to determine which rule to apply in parsing the statement. This determination is called &#34;disambiguation of rules&#34;. 
     Disambiguation of rules, in the present invention, is accomplished by searching the rules stored in the system in the order described below. The first rule encountered that can be used to parse the expression under consideration is the rule that is used. 
     For each rule, measures of length, generality, and position are computed. The length of a rule is a measure of the size of the left-member of the rule. The generality of a rule is a measure of the size of the class of expressions that could be instances of the rule. The position of a rule reflects the placement of the rule according to some indexing scheme. 
     In the disclosed embodiment, length is computed as the sum of the number of printing tokens and the number of slots in the left-member of the rule. Generality is computed as the number of distinct slots in the left-member. Position corresponds to the position of the rule in a listing of rules that is viewable and modifiable by the user. 
     Rules are searched so that those of greater length precede those of lesser length. Given two or more rules of the same length, those of lesser generality precede those of greater generality. Given two or more rules of the same length and generality, those having a lower position precede those having a higher position. 
     If X can be decomposed into S-Rule and other material X&#39;, where S-Rule is an instance of a rule, then control is transferred to the step 54 labeled &#34;Parse S-Rule&#34; in FIG. 3. Parsing transforms S-Rule into a sequence of tokens and objects. For example, 
     [$what$, $ $, $is$, $ $, $the$, $ $, $arr$, $ --  $, $time$, $ $, $of$, $ $, $flight$, $ $, $222$] 
     would be transformed into the following, applying the rule in (9): 
     [$what$, $ $, $is$, $ $, $the$, $ $, ([$arr$, $ --  $, $time$], column), $ $, $of$, $ $, $flight$, $ $, ([$222$], number)]. 
     Methods for transforming a tokenized input into a sequence of tokens and objects, using rules of the kind described herein, will be familiar to one skilled in the art. 
     Step 53 is nondeterministic, because there may be more than one way to decompose X into an S-Rule and an X&#39;. Step 54, however, is deterministic. This is because the disambiguation of rules as described above allows only a single rule to be successfully applied to a given input. It is consistent with the present invention, however, to reformulate this step so as to make it nondeterministic by dropping or relaxing one or more of the criteria used in the disambiguation of rules. For example, if rules were not assigned a position as described above, then it would be possible to generate collections of rules with respect to which some inputs were ambiguous, with the result that &#34;Parse S-Rule&#34; would be capable of generating multiple solutions when presented with these inputs. 
     If the test of step 53, &#34;X=S-Rule+X&#39;&#34;, fails, then control is transferred to the step 58 labeled &#34;Backtrack.&#34; Backtracking will succeed if a new solution can be generated at an earlier invocation of &#34;X=S-Formal+X&#39;,&#34; &#34;Parse S-Formal,&#34; &#34;X=S-Rule+X&#39;,&#34; or &#34;Parse S-Rule.&#34; The term &#34;backtracking&#34; is used in the sense familiar to one skilled in the art. 
     If backtracking is not possible, control is transferred to step 59, labeled &#34;Fail.&#34; If &#34;X=S-Rule+X&#39;&#34; succeeds then, as is shown in FIG. 3, control is eventually transferred to step 55, &#34;X&#39; terminal.&#34; 
     If, as a result of the steps in step 50, X can be parsed, then control is transferred to step 60, labeled &#34;Translate X&#34; in FIG. 1. Following this step, control is transferred to step 45, &#34;Process X.&#34; Depending on the application, and in particular on the mechanism of &#34;Process X,&#34; it may not be necessary to translate X prior to transferring control to step 45. 
     If control has been transferred to step 60, &#34;Translate X,&#34; then from the logic of the steps followed to this point it is known that X is composed of one or more statements that can be parsed. If these statements consist entirely of instances of the underlying formal language(s), then there is no need for, or possibility of, translation. Otherwise, each statement that is an instance of a rule is translated by applying to the statement the rule of which it is an instance, in the manner now set forth. 
     To illustrate the translation of a statement, consider the following tokenized input: 
     [$show$, $ $, $dep$, $ --  $, $time$, $ $, $345$]. 
     This is an instance of the rule in (10). The translation of this input, applying the rule in (10), would be the following: 
     [[$what$, $ $, $is$, $ $, $the$, $ $, $dep$, $ --  $, $time$, $ $, $of$, $ $, $flight$, $ $, $345$]] 
     When a tokenized statement is translated, each token in the left-member of the rule that is applied is matched by a similarly located token in the statement. Each slot in the left-member is matched by a similarly located set of tokens in the statement. The matching tokens must satisfy the datatype of the slot. 
     Each slot in the rule is replaced by the set of tokens that match it. The replacement applies to all instances of the slot in both the left-member and right-member of the rule. 
     Translation of the statement is completed when the statement is replaced by the right-member of the rule that is being applied, with the slots of the right-member replaced by sequences of tokens as just described. 
     Once a statement has been translated, the translation may turn out to contain one or more instances of rules stored in the system. In this case, translation can be applied recursively. For example, the translation shown above could itself be translated using the rule in (9). This would yield the following: 
     [[$select$, $ $, $dep$, $ --  $, $time$, $ $, $from$, $ $, $flights$, $ $, $where$, $ $, $flight$, $ $, $=$, $ $, $345$, $;$]]. 
     When the translation step 60 is completed, control is transferred to &#34;Process X&#34; step 45. 
     If X cannot be parsed during step 50, then control is transferred to step 70, labeled &#34;Obtain input Y.&#34; Step 70 is identical in its operation to step 20, as explained in FIG. 2. Similarly, step 80, &#34;Y can be parsed,&#34; has the same sequence of steps as step 50, as explained in FIG. 3. 
     After input Y is obtained during step 70, control passes to step 80 labelled &#34;Y can be parsed.&#34; If Y cannot be parsed in step 80, then control passes to step 90, labeled &#34;Form synonym.&#34; At this stage, the pair, X→Y, can be stored as a synonym. Whether it is stored depends on details of the implementation. Storage may be immediate and automatic, or it may depend on a subsidiary dialogue with the user, or on other considerations. 
     It is consistent with the present invention for a synonym and/or its members to contain material in addition to that mentioned in the foregoing discussion. In the disclosed embodiment, for example, a synonym also contains a measure of the length of its left-member. As described earlier, this supports disambiguation of synonyms. Once synonym formation is completed, control is transferred to step 20, &#34;Obtain input X.&#34; 
     If the test &#34;Y can be parsed&#34; in step 80 succeeds, then control is transferred to step 100, labeled &#34;Induction.&#34; Induction step 100 is shown in expanded detail in FIG. 4. Induction can be illustrated by referring to the following pair derived from (2): 
     (12) [$what$, $ $, $is$, $ $, $the$, $ $, $arr$, $ --  $, $time$, $ $, $of$, $ $, $flight$, $ $, $222$] 
     →[[$select$, $ $, ([$arr$, $ --  $, $time$], column), $ $, $from$, $ $, ([$flights$], table), $ $, $where$, $ $, ([$flight$], column), $ $, $=$, $ $, ([$222$], number), $;$]]. 
     The left-member of (12) is the left-member of (2) after being subjected, in accordance with the logic described in FIG. 1, to tokenization and preprocessing. In the course of preprocessing, the sequence &#34;$arrival$, $ $, $time$&#34; in (2) was replaced by &#34;$arr$, $ --  $, $time$&#34;. The right-member of (12) is the right-member of (2) after being subjected, in accordance with the logic described in FIG. 1, to tokenization, preprocessing, and parsing. Consistent with the foregoing discussion, the left-member of a pair such as (12) will be referred to as X, the right-member as Y. 
     The first step in induction, step 101, is &#34;Extract objects from Y.&#34; A list is extracted from Y comprising the objects contained therein. As will be described below, the system may have learned to exclude certain objects from induction. If this is the case, then no excluded objects are included in the list. 
     Assuming no excluded objects, the output of step 101, &#34;Extract objects from Y,&#34; for (12), would be the following: 
     [([$arr$, $ --  $, $time$], column), ([$flights$], table), ([$flight$], column), ([$222$], number)]. 
     The next two steps, 102 and 103, are &#34;Clear primary X-store&#34; and &#34;Clear secondary X-store.&#34; As will be shown below, objects are generated in X by step 104, &#34;Generate objects in X.&#34; Each time this occurs, the objects are stored in both a primary and secondary X-store. Steps 102 and 103 clear both of these stores. 
     Control is next transferred to step 104, &#34;Generate objects in X.&#34; The mechanism of step 104 is as follows. Each object is selected in turn from the list of objects supplied by step 101, &#34;Extract objects from Y.&#34; For a given object, X is scanned to see if there is a set of tokens in X that matches the referent of the object. If there is a match, the matching set in X is nondeterministically transformed into an object identical to the object under consideration. 
     If there is more than one match in X for the referent of a given object, it is implementation-dependent whether to allow more than one of these matches to be transformed into an object during an invocation of &#34;Generate objects in X.&#34; 
     The next object is then selected and the process repeated, until all of the objects in the list are exhausted. 
     In (12) there is, in X, a match for the referents of &#34;([$arr$, $ --  $, $time$], column),&#34; &#34;([$flight$], column),&#34; and &#34;([$222$], number).&#34; Given the nondeterminism of &#34;Generate objects in X,&#34; it can generate any of the following outputs: 
     (13) [$what$, $ $, $is$, $ $, $the$, $ $, ([$arr$, $ --  $, $time$], column), $ $, $of$, $ $, ([$flight$], column), $ $, ([$222$], number)]; 
     (14) [$what$, $ $, $is$, $ $, $the$, $ $, ([$arr$, $ --  $, $time$], column), $ $, $of$, $ $, ([$flight$], column), $ $, $222$]; 
     (15) [$what$, $ $, $is$, $ $, $the$, $ $, ([$arr$, $ --  $, $time$], column), $ $, $of$, $ $, $flight$, $ $, ([$222$], number)]; 
     (16) [$what$, $ $, $is$, $ $, $the$, $ $, $arr$, $ --  $, $time$, $ $, $of$, $ $, ([$flight$], column), $ $, ([$222$], number)]; 
     (17) [$what$, $ $, $is$, $ $, $the$, $ $, ([$arr$, $ --  $, $time$], column), $ $, $of$, $ 20$, $flight$, $ $, $222$]; 
     (18) [$what$, $ $, $is$, $ $, $the$, $ $, $arr$, $ --  $, $time$, $ $, $of$, $ $, ([$flight$], column), $ $, $222$]; 
     (19) [$what$, $ $, $is$, $ $, $the$, $ $, $arr$, $ --  $, $time$, $ $, $of$, $ $, $flight$, $ $, ([$222$], number)]; and 
     (20) [$what$, $ $, $is$, $ $, $the$, $ $, $arr$, $ --  $, $time$, $ $, $of$, $ $, $flight$, $ $, $222$]. 
     Observe that in the first output (13), three objects are present; in the next three outputs (14), (15), and (16), two objects are present; in the next three outputs (17), (18) and (19), one object is present; and in the last output (20), no objects are present. 
     There are criteria other than strict equality that could be applied to determine whether a match exists between a referent and a set of tokens. Considering text, it is possible to relax the requirement of strict equality and to allow that a referent and set of tokens match regardless of capitalization, e.g. [$Hello$]matches [$hello$]; or that a match occurs between terms that are semantically equivalent, as defined in some dictionary, e.g. [$Hello$]matches [$How$, $ $, $are$, $ $, $you$]; or that a match occurs between terms that can be made identical by some spelling-correction algorithm, e.g. [$Hello$]matches [$Helo$]; and so forth. 
     The next step in FIG. 4, step 105, is &#34;Store X objects.&#34; The objects generated in X by step 104, &#34;Generate objects in X,&#34;  are placed in both the primary and secondary X-store, so that they are available at stage 109, &#34;Exclude objects.&#34; For example, if the output of step 104, &#34;Generate objects in X,&#34; were the output in (13), then at step 105 the objects &#34;([$arr$, $ --  $, $time$], column)&#34;, &#34;([$flight$], column)&#34; and &#34;([$222$], number)&#34; would be placed in the primary and secondary X-store. 
     The secondary X-store will always be empty at step 105, because it is cleared before each invocation of step 104. The primary X-store, on the other hand, may not be empty, as it is only cleared once, following step 101. If an object is in the primary X-store and is also one of the objects generated by the most recent invocation of step 104, &#34;Generate objects in X,&#34; there is no need to store it twice. 
     Control is next transferred to step 106, &#34;Flatten Y.&#34; An object is flattened if the tokens in the object&#39;s referent replace the object. It can be said that Y is flattened if each of the objects in Y is flattened that was not generated in X by the most recent invocation of step 104, &#34;Generate objects in X.&#34; 
     Suppose, for example, that (15), above, was produced by the most recent invocation of step 104, &#34;Generate objects in X.&#34; Then the following objects in Y were not generated in X: 
     ([$flights$], table); ([$flight$], column). 
     Flattening Y would replace these objects by the tokens in their referents. The pair, X→Y, after the flattening of Y, would appear as follows: 
     (21) [$what$, $ $, $is$, $ $, $the$, $ $, ([$arr$, $ --  $, $time$], column), $ $, $of$, $ $, $flight$, $ $, ([$222$], number)] 
     →[$select$, $ $, ([$arr$, $ --  $, $time$], column), $ $, $from$, $ $, $flights$, $ $, $where$, $ $, $flight$, $ $, $=$, $ $, ([$222$], number), $;$]. 
     At the end of step 106, &#34;Flatten Y,&#34; X and Y contain the same objects. 
     Control is now transferred to step 107, &#34;Generalize.&#34; Generalization, in the present invention, is based on the linguistic assumption that for a given X→Y, the equivalence in meaning between X and Y will be preserved if the referent of an object that occurs in both X and Y is replaced by another referent of the same datatype, for all occurrences of the object in X and Y. 
     Referring to the pair in (21), this assumption asserts that the relationship between X and Y would be preserved if both occurrences of &#34;[$arr$,$ --  $, $time$]&#34; were replaced by some other referent satisfying the column datatype and/or if both occurrences of &#34;[$222$]&#34; were replaced by some other referent satisfying the number datatype. 
     Given this assumption, it is reasonable to generalize from a given pair to a rule representing all pairs having the same structure. Generalization, in the present invention, is accomplished by changing objects into slots. To each object is associated an index, and the index replaces the referent of the object. As mentioned earlier, the index is a member of some enumerable set. 
     Using the pair in (21), the index 1 can be associated with &#34;([$arr$, $ --  $, $time$], column)&#34; and index 2 can be associated with &#34;([$222$], number)&#34;. The result is the following: 
     [$what$, $ $, $is$, $ $, $the$, $ $, (1, column), $ $, $of$, $ $, $flight$, $ $, (2, number)] 
     →[[$select$, $ $, (1, column), $ $, $from$, $ $, $flights$, $ $, $where$, $ $, $flight$, $ $, $=$, $ $, (2, number), $;$]] 
     This is the rule that was exhibited earlier in (9). 
     Once a rule has been produced, control is transferred to step 108, &#34;Accept rule.&#34; Acceptance could be provided or denied by a human user or there could be criteria in the system that allow it to provide or deny acceptance. If a rule is accepted then the rule is stored. 
     A rule would, in the normal course of events, be rejected if it has a slot where it shouldn&#39;t and/or fails to have a slot where it should, according to the judgment of the user or according to criteria applied by the system. Consider, for example, the following rule: 
     (22) [$what$, $ $, $is$, $ $, $the$, $ $, (1, column), $ $, $of$, $ $, (2, column), $ $, (3, number)] 
     →[[$select$, $ $, (1, column), $ $, $from$, $ $, $flights$, $ $, $where$, $ $, (2, column), $ $, $=$, $ $, (3, number), $;$]] 
     Given the pair in (12) as the input of induction, and given (13) as the output of step 104, &#34;Generate objects in X&#34;, the rule in (22) would be the output of step 107, &#34;Generalize&#34;. In this rule, the token &#34;$flight$&#34; has been replaced by the slot &#34;(2, column).&#34; In English, queries such as &#34;what is the cost of flight 222&#34; make sense, whereas queries such as &#34;what is the cost of arrival time 222,&#34; or &#34;what is the cost of cost 222,&#34; do not. In other words, it does not make sense to allow an arbitrary column expression to replace &#34;flight&#34; in the example under consideration. The rule exhibited above, therefore, would probably be rejected. For similar reasons, a rule derived from (14) would probably be rejected. 
     If a rule is rejected at step 108, then control is transferred, in FIG. 4, to step 109, &#34;Backtrack.&#34; It was indicated above that step 104, &#34;Generate objects in X,&#34; is nondeterministic. Through backtracking, multiple solutions can be generated by step 104, &#34;Generate objects in X.&#34; Assuming that not all of the available solutions have been generated, step 109, &#34;Backtrack&#34; will succeed. Otherwise, it will fail, leading to the state &#34;Fail&#34;. 
     If step 108, &#34;Accept rule,&#34; succeeds, control is transferred to step 110, labeled &#34;Exclude objects.&#34; The purpose of excluding objects from induction arises from the possibility of generating a rule that is unacceptable because it has a slot where it shouldn&#39;t, as described above. This situation can be avoided if the object from which the slot derived was among the excluded objects stored in the system. 
     In the example being pursued, the object &#34;([$flight$], column),&#34; had it been among the excluded objects, would not have been present in the output of step 101, &#34;Extract objects from Y,&#34; and so would not have become involved in any subsequent steps. Rules with a slot corresponding to this object could not have been generated. 
     Excluding objects, and the mechanisms associated with it, is a refinement of induction. In other words, induction could be carried out as described herein with the steps &#34;Clear primary X-store,&#34; &#34;Clear secondary X-store,&#34; &#34;Store X objects,&#34; and &#34;Exclude objects&#34; removed. 
     The steps involved in stage 110, &#34;Exclude objects,&#34; are shown in more detail in FIG. 5. The first step, step 112, is &#34;Remove secondary from primary X-store,&#34; where the objects in the secondary X-store are removed from the primary X-store. The primary X-store will contain the objects that were generated in X by all invocations of step 104, &#34;Generate objects in X.&#34; The secondary X-store will contain only those objects that were generated in X by the most recent invocation; this is the invocation that led to the acceptance of a rule in the course of the present induction. 
     The objects in the secondary X-store correspond to slots in the rule that was accepted, while the objects in the primary X-store that are not also in the secondary X-store do not correspond to any slots in the rule that was accepted. It is these objects that are in the primary X-store but not in the secondary, that are returned by step 112. Because they do not correspond to slots in the rule that was accepted, backtracking must have been required to generate a solution of &#34;Generate objects in X&#34; not containing these objects. Because it promotes efficient use of the system to reduce backtracking during induction, these objects should be considered for exclusion from induction. 
     Control is next transferred to step 114, &#34;Enhance candidates.&#34; There is a set of objects stored in the system that are candidates for exclusion from induction. To each candidate is associated a strength. For the purposes of illustration it is assumed that strength is an integer with minimum value 1. Each object returned by step 112, &#34;Remove secondary from primary X-store,&#34; is considered in turn. If it is already a candidate, the strength of the candidate is incremented. If it is not a candidate, it is stored as a candidate, and given a strength of 1. 
     Control is next transferred to step 116, &#34;Propose candidates for exclusion.&#34; There is a system parameter called the exclusion threshold. Each object whose strength exceeds the exclusion threshold is removed from the set of candidates; it can then be added to the set of objects excluded from induction. Whether a given supra-threshold object is in fact added to the set of excluded objects can be determined by a dialogue with the user, or through some other means. At the termination of the process, all of the candidates that remain have strengths at or below threshold. 
     Returning to FIG. 1, if &#34;Induction&#34; step 100 returns a positive result, then control is transferred to &#34;Obtain input X&#34; step 20. If &#34;Induction&#34; step 100 returns a negative result, then control is transferred to &#34;Backtrack&#34; step 120. Backtracking will succeed if step 80, &#34;Y can be parsed,&#34; which is nondeterministic (as described above) can generate a new solution. In that case, &#34;Induction&#34; step 100 is reinvoked. If &#34;Backtrack&#34; step 120 yields a negative result, then control is transferred to &#34;Obtain input X&#34; step 20. 
     While the invention has been described with reference to a preferred embodiment, the description is for illustrative purposes only and is not to be construed as limiting the scope of the invention. Various modifications and changes may occur to those skilled in the art without departing from the true spirit and scope of the invention as defined in the appended claims.