This page explores a novel method of parsing a sentence for structure and meaning by recursively fusing together adjacent sentence elements. It should be noted that this web page is not the result of working out the details of this system. Instead, it is part of the very process of working out those details, and should be considered incomplete, provisional, and in a state of flux.
Definitions
Sentence Element - A sentence element is either a single word, or a fused group of words. Sentence elements which consist of more than one word are enclosed in square braces, prefixed by a tag name. Single words are tagged by writing the tag, an equal sign, and the word. For example, "the dog" initially consists of two separate words. After being tagged they might become "D=the N=dog" indicating that they are, respectively, a determiner and a noun. The hypothetical rule "[D N]->ND" is applied and these two words are fused into the single tagged element "ND[D=the N=dog]", which is tagged as a determined noun.
Rule Dictionary - A dictionary of rules is used to determine what fusion steps occur during each round of fusion. These rules fall into three categories: Tagging Rules, Fusion Rules, and Swap Rules.
Tagging Rule - A tagging rule is one that applies a functional tag to a word to identify (or, more correcrtly, hypothesize) the general class or part of speech of that word. An example might be "dog->N" which tags the word "dog" as possibly being a noun. The rule "dog->V" might identify "dog" as possibly being a verb as in "he used to dog my footsteps." The same word might be tagged as several different possible parts of speech, but as the fusion process proceeds (and assuming an inherently non-ambiguous sentence) all but one of those possibilities will fall away leaving the one proper tag for each sentence element.
Fusion Rule - A fusion rule consists of three parts, a pair of tag names which constitutes the adjacent pair of tagged elements to which this rule applies, and a third tag name which is the tag that will be applied to the resulting fused pair. An example might be "[D N]->ND" which fuses an element tagged "D" to an element tagged "N" to form a new element tagged "ND".
Swap Rule - A swap rule, like a fusion rule, is applied to a pair of adjacent tagged elements, however rather than being fused, these two elements have their positions in the sentence swapped. Rules of this type permit sentences with "crossing dependancies".
The process of discovering the rules that need to be included in the rule dictionary begins with developing an intuitive sense of what it means to parse a sentence by fusion, and then seeking to systematize and codify that intuition. Like the rules of grammar, the rules of fusion must be "observed in the wild" by observing how the rules are implicitly used by someone who does not explicity understand those rules. A young child can master most of the rules of basic grammar without ever being able to explain those rules, and in a similar manner, we can trust our linguisitc intuition (or "subconscious data processing") to mostly use the rules correctly even before we consciously understand what those rules might be.
The procedure, therefore, is to collect a large number of fusion-parsed sentences and then extract the rules from those exemplars. To that end I have collected several thousand sentences from online public domain literary sources ranging from the simple "Dogs bark." to moderately involved sentences like "If the boys had to spend a great deal of money for pleasures, most of them would seldom have much fun."
As each sentence is parsed by hand notes are taken regarding the tags used, and what the specific intent of those tags might be. In addition, the tagged words temselves are extracted and added to the rules dictionary. In this way once the rules have been extracted then applying those rules to the original sentences should result in the same parsing as was performed by hand. Shortly we will look at some sample parsed sentences to demonstrate how adjacent elements are fused to produce compound elements.
Tags should be applied to words and phrases that have the same syntactic and semantic functions. For example, a tag might apply to the class of all words and phrases that could properly complete the sentence "He went_____", and would include such members as "to the park", "home", "to school", "to the concert", etc. It includes any prepositions, expressed or implied, that make it a destination. Verbs which take a destination do not have an implied preposition. Thus "go" takes a destination argument but "enter" does not, since "enter" implies the preposition "into". In other words, we do say "go to the park", but we do not say "enter to the park." We might say that while "go" takes a destination, "enter" takes a determined location (or certain event types) such as "the room", "a dark and gloomy cave", "the contest", "the race for governor", etc.
So even though "home" and "the park" both appear to simply be locations, they are not interchangable, and belong to different categories. Perhaps the best way to define a given tag is to list a few example of slots that must be fillable with a word or phrase in order for it to qualify for that tag. Thus we might say that the tag N01 (for example) for nouns might that name a destination and fill slots like "Go to _____", and "Once in ________, we rested". We see that "the house" fits those slots but "home" does not. The slot "Go _______" requires that some preposition be fused to the N01 giving a N02, or noun of destination. We can fill that slot with "home", "into the boat", and "under the umbrella", so these share the same tag. Some slots can be filled by more than one tag type. "He left ______" can be "He left home." or "He left the barn." Such slots are not useful for determining tag identities.
The role played by tags is as flexible as any user of this approach wants it to be. Tags can encode strictly syntactic features of the words and phrase elements, or varying degrees of "meaning" can be encoded in the tags. Syntactically, "house", "water", and "coin" are all simply nouns. But they fall into overlapping semantic categories. For example, "house" and "water" describe things which can be "entered", as in "He went into the house." and "I jumped into the water." "House" and "coin" are discrete objects which are also made-made, while "water" is a mass noun to which mass units of measure may be applied ("three quarts of water", "two pounds of water"), whereas we would not say "two and a half gallons of house". Both "coin" and "water" are portable things that can be carried or thrown. These and other distinctions can be implicit in the tags. Just how far to go with encoding semantic knowledge is something that will have to be determined experimentally. It makes sense to distinguish between mass nouns and discrete nouns, as well as nouns which are animate objects vs. inanimate objects. Proper names should probably be distinguished from generic nouns. But the biggest difficulty with over-specifying the tag classes is that the number of rules grows exponentially. A simple rule that fuses a noun to a verb now must be duplicated for every class of noun crossed with every class of verb.
To begin with, I will attempt to make classes very specific and make as many distinctions as I possibly can. Then, as the rule dictionary grows, I will begin to combine multiple categories which seem unnecessarily specific into broader categories. The motivation will to keep the rule dictionary of reasonable size while not sacrificing the ability of the rule set to unambiguously parse a wide range of sentences.
Below we will look at a few sentences and try to work out the proper parse of each, while assigning whatever tags seem useful. Initially the tags will just be assigned class numbers. As time goes on and more examples are collected some of those classes may be merged.
|
Using one of the sentences from the above list, here is an example of how the rules dictionary and tag list might be extracted from that sentence, we can disect this parsing and extract the rules and tag definitions. Beginning with the innermost elements we strip out the internal structure of the element, add it to the list of rules and replace it in the sentence with the outer tag only. For example:
|
Applying that procedure recursively until the entire sentence is comsumed and its elements added to the dictionary, we end up with this set of rules produced from that example:
|
Since a nested parenthetical expression is exactly equivalent to an indented outline and to a tree, it might be interesting to look at the same parse result displayed in outline and tree formats.
|
One of the first questions that arises when trying to apply fusion parsing to sentences captured in the wild, is how can differing word orders be handled, and what happens when a dependancy exists between two words that are not adjacent in the sentence? Link Grammar, which is a form of parsing that establishes linkages between elements of the sentence, allows links to connect sentence elements that are physically distant from each other, but fusion grammar insists that all related elements be immediately adjacent. How can this requirement be satisfied when sentences are known to exist which have more distant dependancies, and dependancies that cross each other?
In many cases, simply having a pair of rules where the predicate tags are in complemetary order will solve the problem. For example, "[we•NPR [went•VED [[along•DIR [the•DET [country•ADJ road•NPL]•NPL]•NPD]•NTR [for•PRE [many•QTY miles•NMU]•NMQ]•PRP]•PRP]•VDO]•SVO" joins the phrase "along the country road" to the following phrase "for many miles" with the rule "[NTR PRP]•PRP". However, if the sentence placed the two phrases in reverse order, "We went for many miles along the country road." then the simple inclusion of the complementary rule "[PRP NTR]•PRP" would enable the system to succesfully parse the sentence regardless of that phrase order change.
Some situations may at first appear to require some kind crossing links, but deeper analysis often reveals that this is not the case. Consider the sentence "Did you have lunch?" It appears that the phrase "did ... have" includes the word "did" which appears to modify the verb "have", requiring that they be fused to express the complete meaning. However, we could also say that the actual role played by the word "did" in this sentence is to be a query-marking particle (tag = QMP) with the literal meaning: "Is the following statement true?" Then we can parse the marked statement this way:
|
Other situations are more complex, actually requiring crossing dependancies. But I believe these can always be resolved with rules which under certain conditions, and with certain restrictions, swap pairs of elements and eliminate crossing dependancies. Since the principle goal of fusion parsing is to extract the "meaning" of a sentence, details of word and phrase order are considered irrelevant, and may be freely modified without altering the essential meaning of the sentence.
Element transposition rules must be employed in a manner that does not violate adjacency of the related pairs, and does not create "false adjacency". For example, there is no graceful way to parse "was gently falling to the ground", because the proper parse would include [[was falling] gently], which requires that "gently" be removed from its location between "was" and "falling". However, in the proper parse "gently" remains adjacent to "falling", suggesting that the rules may allow for limited transposition as long as the critical adjacency is not broken, and that no fusion can be based on an incidental, or false adjacency created by the transposition. Element swapping rules must, therefore, place a "wall" between the transposed word and any word that follows it: "was falling gently | on the ground"
In the case of "did you have...", transposition results in "you did have" which has an entirely different meaning since [did have] puts "have" into the past and destroys the query nature of the sentence. With the wall placed between "did" and "have", e.g. "did | have" that erroneous fusion is forbidden.
The fact that the deep meaning of "did" changes radically with that transposition suggests that transposition rules should not be applied in this case, and that interpreting "did" as a query-marking particle that properly belongs at the front of the query, rather than a past tense marker, is reasonable.
Some verbs actually consist of more than one word. These secondary words that complete the meaning, as with "up" in "Open the box up." really belong to the verb and do need to be fused with the verb to complete its meaning. Such words require adjacency rules involving a central element being surrounded by two "bookend" elements. In other words, the adjacency is more strict because the middle word has to satisfy TWO adjacency rules simultaneously. For example in: "open [the box] up" where "[the box]" requires simultaneous adjacency to both bookends, "open ... up" forming a rule with three elements which causes the sandwiched element to be removed and placed after the bookend elements: "open up [the box]", after which "open" and "up" can be fused by another applicable rule.
Another example of bookend elements is found in examples like "John is as old as me.", where the parsed meaning will end up being something like (as a first guess) "[John [be [[as as] old] me]]"
Here's an example applying a few swapping rules to a sentence that seems to defy adjacency:
|
|
The phrase "on a beautiful day like this" gets fused into a single prepositional element giving:
|
A bookend rule for "are PRP VRB" puts the PRP outside the bookends and we get:
|
The verb fragment "are" is joined giving "[are doing]" and the subject is is fused giving "[you [are doing]]" The final prepositional phrase "on a beautiful day like this", and the location modifier "inside" get fused, and the final two elements, the SVO statement and the query marker are joined to form the full meaning:
|
One subtle complication that was glossed over is the inherent ambiguity of the original sentence. The question "What are you doing in there?" can mean either "What activity are you engaged in while in there", or the more idomatic meaning, "WHY are you located in there?". The implication of the "why are you in there?" interpretation is "What activity do you intend to do while in there?"
In practise, the questions "What are you doing in there?" and "What do you intend to do in there?" are pretty much interchangable, and will be treated as equivalent for now.
(Dec. 4, 2006. To be continued)