Searching

In the text, we have

The warranty period is fifteen months from the delivery date.

Some possible search strings

Warranty period

Warranty period is how many months from the delivery date

Warranty period is twelve months from the delivery date

The search string can

be a means of finding and displaying the relevant text (the clauses, subclauses and sentences that produced the matched structure)
use a dummy variable (how many, how much) which will be matched and resolved against the structure
assert a fact and have its validity confirmed or denied or be unknown.

Taking the simplest case, we want to search for

The warranty period

and return a reference to the appropriate sentence or sentences that created this part of the structure.

We set a store level so that all construction during searching can be undone, then create the structure using a Search form, then transform it into a structure suitable for searching – a search map. Unlike matching against a preposition map, where we have the objects already and wish to find the possible connections, here we are using a new structure to probe an existing structure. That means finding other objects that are invocations of the same parent object (or of its synonym). We need to ignore parents which have to do with words or word structure (warranty is an invocation of SingularNoun, for example).

The word tokens, while adequate in this example, are not a good starting point – we are not interested in articles or verb auxiliaries, as they are not part of the transformed structure. In the case of the simple example above, two of the tokens are nouns and survive the transformation to appear in the structure, and are connected together through an operator used in matching.

A token built from the search string will have connections to an ANDPARSE operator in the parse chain, may have connections to SingularNoun and other word elements. A unique token, such as California or a token from the local dictionary ("Seller"), may have connections to other sentences. All of these connections need to be ignored.

We use the Sentence node (the object representing the sentence or query) to determine what part of the structure should be used for searching. Its address is written into every link (an "origin" field) that is built for the structure. Only these links will be used in the searching process. That is, any link with a different origin is ignored.

Searching has to be able to step over ToBe operators - there is no difference (assuming the time range is valid) between

the warranty period of six weeks

the warranty period is six weeks

A fragment of the existing structure and the search structure might look like

searchstructure.wmf (101786 bytes)

In this case, a variable with a range in the search structure will be matched to a single value in the existing structure, providing an answer to a query posed as a statement but using "how many" instead of a value. Nonmatching units are handled during searching, so fourteen days will match two weeks.

The result of matching one structure against another is far greater precision of matching than word matching can provide, and the ability to extract values or logical states from the structure.