Active Structure Grammar

The notion of a grammar is of a prescriptive set of static rules that dictate how words may be assembled into clauses and sentences. Anyone who attempts this will rapidly run into failure - for two reasons.

  1. We leave out a lot that is obvious to the reader, based on context of which the grammar is unaware, so it cannot apply rules to what is not there, and guessing without context leads to the introduction of ambiguity.
  2. We don't actually know what people do in assembling sentences, we just know the ones that would not be used by a native English speaker. We are attempting to put a static structure around something that is dynamic - the interaction of grammatical rules. We run into the same problem in many other areas - mathematics, for instance. We don't understand enough to tell people what to do in their heads, we fall back on showing them and hope their internal mechanisms are sufficiently like ours so that they will come to the same result. In most cases, it works, but not because they followed prescriptive rules.

Active Structure Grammar (ASG) is an active grammar - that is, it does things - changes things, adds things, rearranges things. The structure that represents the sentence is under continuous modification as the sentence is parsed. The structure starts out as a string of word objects intermixed with PARSE operators. The words have already been operated on during the tokenisation stage, for example combining numbers and units into higher level objects, so 25 kph becomes "velocity" with attributes of value and unit, and seven days becomes "duration". Higher level structures, such as embedded indexes, have also been detected and built.

ASG is an impure grammar, in that words are objects, and have all the properties of the objects they represent. For instance, "commenced" begins the parse with the following attributes, drawn from its parents:

Commencedefflor1.gif (11554 bytes)
PastTense
Verb
PastParticiple
AdjectivalParticiple
VerbalPastParticiple
Participle
Word

Relation1
Relation2
ToDo
ToCommence
BaseRelation
Thing

BeforeSubordinatePhrase
BeforeAdverbialPhrase
AfterNegation
BeforeCoordinatePhrase
BeforeCommaPhrase
BeginVerbPhrase
MiddleNounPhraseComponent
StartMiddleNounPhraseComponent
FinishMultiWordNounPhrase
AfterPreposition
BeginObjectNounPhrase
FinishSingleWordNounPhrase
BeginDoubleWordNounPhrase
BeginMultiWordNounPhrase
AfterSuperordinatePhrase
AfterSubordinatePhrase
AfterCoordinatePhrase
AfterRelativePronounPhrase
AfterSubjectPronounPhrase
AfterAdverbialPhrase
AfterPossessionPronounPhrase
AfterQualifiedNumber
StartPossessiveNounPhrase
FinishNounPhrase
AfterVerbPhrase
BeginNounPhrase
BeforeAdjectivalPhrase
BeforeInfinitive
BeforeVerbPhrase
BeforeRelativePronounPhrase
BeforeQuotedPhrase
BeforePrepositionalPhrase
BeforeParticipialPhrase
BeginSingleWordVerbPhrase
WordStructure

The various attributes are to do with parts of speech, what the ToCommence relation is, and the places in a sentence that this word can take.

efflor4.gif (17638 bytes)

If this word is placed next to another word that prunes some of these possibilities - let's say an article for maximum effect - then many of these attributes are pruned away, leaving

AdjectivalParticipleefflor5.gif (11904 bytes)
Word

Relation1
Relation2
ToDo
ToCommence
BaseRelation
Thing

MiddleNounPhraseComponent
StartMiddleNounPhraseComponent
FinishMultiWordNounPhrase
FinishNounPhrase
BeforeInfinitive
BeforeVerbPhrase
BeforeRelativePronounPhrase
BeforeSubordinatePhrase
BeforeAdverbialPhrase
BeforeQuotedPhrase
BeforePrepositionalPhrase
BeforeParticipialPhrase
BeforeCoordinatePhrase
BeforeCommaPhrase
WordStructure

Pruning occurs either because no structure can be found that allows the combination across it, or the combination is actively declared inconsistent, using a NOTCONSISTENT operator. As a result of pruning, the number of word position possibilities has gone from forty-seven to fourteen. The word on the other side will similarly prune many of its possibilities. Pruning can be based on the type of word, or the object it represents - only relations and a few  objects can be "commenced". Pruning ripples along the chain as well - object A reduces the alternatives on B, which changes the alternatives on C, and then on D, which may change the alternatives on C, and so back to A.

This rippling pruning is still based only on direct neighbours. After all pruning resulting from neighbouring words has occurred, pruning again takes place, but using multi-symbol structures which can span as many symbols as required to enforce the grammatical or semantic constraint.

If a symbol is identified that needs to be removed so that parsing can proceed - negation, parenthetical phrases, adverbial phrases etc. - then the symbol is cut out of the structure and turned into a modifier - see Cutting and Healing. Note that the pruning between it and its previous neighbour is undone when it acquires a new neighbour as part of cutting and healing. Examples:

The Landlord shall not unreasonably withhold consent

The unidentified flying object (UFO) was seen...

This reduces the number of rules required to handle particular cases.

Symbols are also dynamically inserted in the parse chain - an implied relative pronoun in the following:

Any tenant improvement work Tenant desires to perform....

becomes

Any tenant improvement work that Tenant desires to perform....

The inserted symbol provides an anchor point for the clause it supports - the inserted symbol is a special case of "that", so there is no need to disambiguate it from a demonstrative or noun determiner.

ASG is not intended as a complete grammar - instead, its purpose is to orient and connect the objects the discourse describes just enough so that the discourse may be understood - there is a good argument for saying that a complete grammar of a natural language is an unattainable holy grail that grammarians seek, so that understanding of meaning can be avoided. In most cases, the analysis of orientation and connection of objects requires the complete parsing of the sentence, but if all meaning has already been stripped from the sentence, or it can be seen to contain nothing of interest, parsing is terminated.

An ASG allows other operations to be freely intermingled with it - unpacking a noun phrase and probing a knowledge model, changing the inheritance of an object, doing some reasonability calculation, exploring causality, logging errors, whatever. These operations are performed, not by some separate algorithm with its own formalism and control stack, but by operators embedded in the structure and employing the same signalling means - see CAVE.

A static grammar makes very strong assumptions to allow the structure to be created, and then requires masses of exceptions, because a natural language isn't tidy and doesn't follow a few simple rules, and, particularly with English, much is elided. Legal and scientific text is often ugly and barely grammatical, as the writer struggles to pack in information in a confined space, or makes large assumptions as to the reader's knowledge. These forms of text also have many of their own specialised grammatical rules, like embedded indexes or precise long range connections (as described in Section 14(e)(ii) hereunder). An active grammar, with its ability to scamper back to where the embedded indexing began to find how it started, or to make other implied constructs explicit by construction, can handle such constructs without resorting to a person's ability. Any grammar that requires a person to interpret the rules for a particular situation isn't really a grammar at all, but a guide to grammar.

An active structure grammar does not start out with simplistic assumptions that work well for "The cat sat on the mat" but fall apart with more complex constructions, and it can operate on the basis of what the objects actually are, not on whether they can only be symbolised as nouns or gerunds or whatever. The ability to have very many alternatives at many levels of meaning flooding through the structure is a strength of ASG, not a weakness. The cutting and healing or dynamic augmentation of the structure leads to considerable simplification of the parsing task, without loss of semantic information.

But an active grammar is not enough by itself - see The Semantic Octopus

NLP

Cutting and Healing

Dynamic Augmentation