File Information
File: 05-lr/acl_arc_1_sum/cleansed_text/xml_by_section/metho/81/j81-4002_metho.xml
Size: 41,980 bytes
Last Modified: 2025-10-06 14:11:22
<?xml version="1.0" standalone="yes"?> <Paper uid="J81-4002"> <Title>Flexible Parsing i</Title> <Section position="2" start_page="0" end_page="0" type="metho"> <SectionTitle> 1. The Importance of Flexible Parsing </SectionTitle> <Paragraph position="0"> When people use natural language in natural conversation, they often do not respect grammatical niceties. Instead of speaking sequences of grammatically well-formed and complete sentences, people often leave out or repeat words or phrases, break off what they are saying and rephrase or replace it, speak in fragments, or use otherwise incorrect grammar. The following example conversation involves a number of these grammatical deviations: A: I want ... can you send a memo a message to to Smith B: Is that John or John Smith or Jim Smith A: Jim Instead of being unable or refusing to parse such ungrammatical utterances, human listeners are generally unperturbed by them. Neither participant in the above dialogue, for instance, would have any difficulty. When computers attempt to interact with people using natural language, they face a very similar situation; the people will still tend to deviate from whatever grammar the computer system is using. The fact that the input is typed rather than spoken makes little difference; grammatical deviations seem to be inherent in spontaneous human use of language whatever the modality. So, if computers are ever to converse naturally with humans, they must be able to parse their</Paragraph> <Section position="1" start_page="0" end_page="0" type="sub_section"> <SectionTitle> Scientific Research under Contract F49620-79-C-0143. </SectionTitle> <Paragraph position="0"> inputs as flexibly and robustly as humans do. While considerable advances have been made in recent years in applied natural language processing, few of the systems that have been constructed have paid sufficient attention to the kinds of deviation that will inevitably occur in their input if they are used in a natural environment. In many cases, if the user's input does not conform to the system's grammar, an indication of incomprehension followed by a request to rephrase may be the best he can expect. We believe that such inflexibility in parsing severely limits the practicality of natural language computer interfaces, and is a major reason why natural language has yet to find wide acceptance in such applications as database retrieval or interactive command languages.</Paragraph> <Paragraph position="1"> In this paper, we report on a flexible parser, called FlexP, suitable for use with a restricted natural language interface to a limited-domain computer system.</Paragraph> <Paragraph position="2"> We describe first the kinds of grammatical deviations we are trying to deal with, then the basic design characteristics of FlexP with justification for them based on the kinds of problem to be solved, and finally more details of our parsing system with worked examples of its operation. These examples, and most of the others in the paper, represent natural language input to an electronic mail system that we and others \[2\] are constructing as part of our research on user interfaces.</Paragraph> <Paragraph position="3"> This system employs FlexP to parse its input.</Paragraph> <Paragraph position="4"> Copyright 1981 by the Association for Computational Linguistics. Permission to copy without fee all or part of this material is granted provided that the copies are not made for direct commercial advantage and the Journal reference and this copyright notice are included on the first page. To copy otherwise, or to republish, requires a fee and/or specific permission.</Paragraph> </Section> </Section> <Section position="3" start_page="0" end_page="0" type="metho"> <SectionTitle> 2. Types of Grammatical Deviation </SectionTitle> <Paragraph position="0"> There are a number of distinct types of grammatical deviation, and not all types are found in all types of communication situation. In this section, we first define the restricted type of communication situation that we will be concerned with, that of a limited-domain computer system and its user communicating via a keyboard and display screen. We then present a taxonomy of grammatical deviations common in this context, and by implication a set of parsing flexibilities needed to deal with them.</Paragraph> <Section position="1" start_page="0" end_page="0" type="sub_section"> <SectionTitle> 2.1 Communication with a Limited-Domain System </SectionTitle> <Paragraph position="0"> In the remainder of this paper, we will focus on a restricted type of communication situation, that between a limited-domain system and its user, and on the parsing flexibilities needed by such a system to cope with the user's inevitable grammatical deviations.</Paragraph> <Paragraph position="1"> Examples of the type of system we have in mind are database retrieval systems, electronic mail systems, medical diagnosis systems, or any systems operating in a domain so restricted that they can completely understand any relevant input a user might provide. There are several points to be made.</Paragraph> <Paragraph position="2"> First, although such systems can be expected to parse and understand anything relevant to their domain, their users cannot be expected to confine themselves to relevant input. As Bobrow et. al. \[3\] note, users often explain their underlying motivations or otherwise justify their requests in terms quite irrelevant to the domain of the system. The result is that such systems cannot expect to parse all their inputs even with the use of flexible parsing techniques.</Paragraph> <Paragraph position="3"> Secondly, a flexible parser is just part of the conversational component of such a system, and cannot solve all parsing problems by itself. For example, if a parser can extract two coherent fragments from an otherwise incomprehensible input, the decisions about what the system should do next must be made by another component of the system. A decision on whether to jump to a conclusion about what the user intended, to present him with a set of alternative interpretations, or to profess total confusion, can only be made with information about the history of the conversation, beliefs about the user's goals, and measures of plausibility for any given action by the user. (See \[10\] for more discussion of this broader view of graceful interaction in man-machine communication.) Suffice it to say that we assume a flexible parser is just one component of a larger system, and that any incomprehensions or ambiguities that it finds are passed on to another component of the system with access to higher-level information, putting it in a better position to decide what to do next.</Paragraph> <Paragraph position="4"> Finally, we assume that, as is usual for such systems, input is typed, rather than spoken as is normal in human conversations. This simplifies low-level processing tremendously because key-strokes, unlike speech wave-forms, are unambiguous. On the other hand, problems like misspelling arise, and a flexible parser cannot even assume that segmentation into words by spaces and carriage returns will always be correct. However, such input is still one side of a conversation, rather than a polished text in the manner of most written material. As such, it is likely to contain many of the same type of errors normally found in spoken conversations.</Paragraph> </Section> <Section position="2" start_page="0" end_page="0" type="sub_section"> <SectionTitle> 2.2 Misspelling </SectionTitle> <Paragraph position="0"> Misspelling is perhaps the most common class of error in written language. Accordingly, it is the form of ungrammaticality that has been dealt with the most by language processing systems. PARRY \[14\], LIFER \[11\], and numerous other systems have tried to correct misspelt input from their users.</Paragraph> <Paragraph position="1"> An ability to correct spelling implies the existence of a dictionary of correctly spelled words (possibly augmented by a set of morphological rules to produce derived forms). An input word not found in or derivable from the dictionary is assumed tO be misspelt and is compared against each of the dictionary words and their derivations. If one of these words comes close enough to the input word according to some criteria of lexical matching, it is used in place of the input word.</Paragraph> <Paragraph position="2"> Spelling correction may be attempted in or out of context. For instance, there is only one reasonable correction for &quot;relavent&quot; or for &quot;seperate&quot;, but for an input like &quot;un&quot; some kind of context is typically necessary as in &quot;I'11 see you un April&quot; or &quot;he was shot with the stolen un.&quot; In effect, context can be used to reduce the size of the dictionary to be searched for correct words. This both makes the search more efficient and reduces the possibility of multiple matches of the input against the dictionary. The LIFER \[11\] system uses the strong constraints typically provided by its semantic grammar in this way to reduce the range of possibilities for spelling correction.</Paragraph> <Paragraph position="3"> A particularly troublesome kind of spelling error results in a valid word different from the one intended, as in &quot;show me on of the messages&quot;. Clearly, such an error can only be corrected through comparison against a contextually restricted subset of a system's vocabulary.</Paragraph> </Section> <Section position="3" start_page="0" end_page="0" type="sub_section"> <SectionTitle> 2.3 Novel Words </SectionTitle> <Paragraph position="0"> Even accomplished users of a language will sometimes encounter words they do not know. Such situations are a test of their language learning skills. If one did not know the word &quot;fawn&quot;, one could at least American Journal of Computational Linguistics, Volume 7, Number 4, October-December 1981 233 Philip J. Hayes and George V. Mouradian Flexible Parsing decide it was a colour from &quot;a fawn coloured sweater&quot;. If one just knew the word as referring to a young deer, one might conclude that it was being used to mean the colour of a young deer. In general, beyond making direct inferences about the role of unknown words from their immediate context, vocabulary learning can require arbitrary amounts of real-world knowledge and inference, and this is certainly beyond the capabilities of present day artificial intelligence techniques (though see Carbonell \[5\] for work in this direction).</Paragraph> <Paragraph position="1"> There is, however, a very common special subclass of novel words that is well within the capabilities of present day systems: unknown proper names. Given an appropriate context, either sentential or discourse, it is relatively straightforward to classify unknown words as the names of people, places, etc.. Thus in &quot;send copies to Moledeski Chiselov&quot; it is reasonable to conclude from the local context that &quot;Moledeski&quot; is a first name, &quot;Chiselov&quot; is a surname, and together they identify a person (the intended recipient of the copies). Strategies like this were used in the POLITI-CS \[6\], FRUMP \[8\], and PARRY \[14\] systems.</Paragraph> <Paragraph position="2"> Since novel words are by definition not in the known vocabulary, how can a parsing system distinguish them from misspellings? In most cases, the novel words will not be close enough to known words to allow successful correction, as in the above example, but this is not always true; an unknown first name of &quot;AI&quot; could easily be corrected to &quot;all&quot;. Conversely, it is not safe to assume that unknown words in contexts which allow proper names are really proper names as in: &quot;send copies to al managers&quot;. In this example, &quot;al&quot; probably should be corrected to &quot;all&quot;. In order to resolve such cases it may be necessary to check against a list of referents for proper names, if this is known, or otherwise to consider such factors as whether the initial letters of the words are capitalized.</Paragraph> <Paragraph position="3"> As far as we know, no systems yet constructed have integrated their handling of misspelt words and unknown proper names to the degree outlined above.</Paragraph> <Paragraph position="4"> However, several applied natural language processing systems, including the COOP \[12\] system, allow systematic access to a database containing proper names without the need for inclusion of the words in the system's parsing vocabulary.</Paragraph> </Section> <Section position="4" start_page="0" end_page="0" type="sub_section"> <SectionTitle> 2.4 Erroneous segmenting markers </SectionTitle> <Paragraph position="0"> Written text is segmented into words by spaces and new lines, and into higher level units by commas, periods and other punctuation marks. Both classes, especially the second, may be omitted or inserted speciously. Spoken language is also segmented, but by the quite different markers of stress, intonation and noise words and phrases, which we will not consider here.</Paragraph> <Paragraph position="1"> Incorrect segmentation at the lexical level results in two or more words being run together, as in &quot;runtogether&quot;, or a single word being split up into two or more segments, as in &quot;tog ether&quot; or (inconveniently) &quot;to get her&quot;, or combinations of these effects as in &quot;runto geth er&quot;. In all cases, it seems natural to deal with such errors by extending the spelling correction mechanism to be able to recognize target words as initial segments of unknown words, and vice-versa. As far as we know, no current systems deal with incorrect segmentation into words.</Paragraph> <Paragraph position="2"> The other type of segmenting error, incorrect punctuation, has a much broader impact on parsing methodology. Current parsers typically work one sentence at a time, and assume that each sentence is terminated by an explicit end-of-sentence marker. A flexible parser must be able to deal with the potential absence of such a marker, and recognize that the sentence is being terminated implicitly by the start of the next sentence. In general, a flexible parser should be able to take advantage of the information provided by punctuation if it is used correctly, and ignore it if it is used incorrectly.</Paragraph> <Paragraph position="3"> Instead of punctuation, many interactive systems use carriage-return to indicate sentence termination.</Paragraph> <Paragraph position="4"> Missing sentence terminators in this case correspond to two sentences on one line, or to the typing of a sentence without the terminating return, while specious terminators correspond to typing a sentence on more than one line.</Paragraph> </Section> <Section position="5" start_page="0" end_page="0" type="sub_section"> <SectionTitle> 2.5 Broken-Off and Restarted Utterances </SectionTitle> <Paragraph position="0"> In spoken language, it is very common to break off and restart all or part of an utterance: I want to -- Could you tell me the name? Was the man -er- the official here yesterday? Usually, such restarts are signalled in some way, by &quot;um&quot; or &quot;er&quot;, or more explicitly by &quot;let's back up&quot; or some similar phrase.</Paragraph> <Paragraph position="1"> In written language, such restarts do not normally occur because they are erased by the writer before the reader sees them. Interactive computer systems typically provide facilities for their users to delete the last character, word, or current line as though it had never been typed, for the very purpose of allowing such restarts. Given these signals, the restarts are easy to detect and interpret. However, users sometimes fail to make use of these signals. Input not containing a carriage-return can be spread over several lines by intermixing of input and output, or a user may simply fail to type the &quot;kill&quot; character that deletes the input line he has typed so far, as in: delete the show me all the messages from Smith 234 American Journal of Computational Linguistics, Volume 7, Number 4, October-December 1981 Philip J. Hayes and George V. Mouradian Flexible Parsing where the user probably intended to erase the first two words and start over. A flexible parser should be able to deal with such non-signalled restarts.</Paragraph> </Section> <Section position="6" start_page="0" end_page="0" type="sub_section"> <SectionTitle> 2.6 Fragmentary and Otherwise Elliptical Input </SectionTitle> <Paragraph position="0"> Naturally occurring language often involves utterances that are not complete sentences. Often the appropriateness of such fragmentary utterances depends on conversational or physical context as in: A: Do you mean Jim Smith or Fred Smith? B: Jim A: Send a message to Smith B: OK A: with copies to Jones A flexible parser must be able to parse such fragments given the appropriate context.</Paragraph> <Paragraph position="1"> There is a question here of what such fragments should be parsed into. Parsing systems that have dealt with the problem have typically assumed that such inputs are ellipses of complete sentences, and that their parsing involves finding that complete sentence, and parsing it. Thus the sentence corresponding to &quot;Jim&quot; in the example above would be &quot;I mean Jim&quot;. Essentially this view has been taken by the LIFER \[11\] and GUS \[3\] systems. An alternative view is that such fragments are not ellipses of more complete sentences, but are themselves complete utterances given the context in which they occur, and should be parsed as such. Certain speech parsers, including HEARSAY-II \[9\] and HWIM \[20\], are oriented towards this more bottom-up view of fragments, and this view is also the basis of our approach to fragmentary input, as we will explain more fully below. Carbonell \[personal communication\] suggests a third view appropriate for some fragments: that of an extended case frame. In the second example above, for instance, A's &quot;with copies to Jones&quot; forms a natural part of the case frame established by &quot;send a message to Smith&quot;. Yet another approach to fragment parsing is taken in the PLANES system \[15\] which always parses in terms of major fragments rather than complete utterances. This technique relies on there being only one way to combine the fragments thus obtained, which may be a reasonable assumption for many limited domain systems. null Ellipses can also occur without regard to context.</Paragraph> <Paragraph position="2"> A type that interactive systems are particularly likely to face is crypticness in which articles and other non-essential words are omitted as in &quot;show messages after June 17&quot; instead of the more complete &quot;show me all messages dated after June 17&quot;. Again, there is a question of whether to consider the cryptic input complete, which would mean modifying the system's grammar, or to consider it elliptical, and complete it by using flexible techniques to parse it against the complete version as it exists in the standard grammar.</Paragraph> <Paragraph position="3"> Other common forms of ellipsis are associated with conjunction as in: John got up and \[John\] brushed his teeth.</Paragraph> <Paragraph position="4"> Mary saw Bill and Bill \[saw\] Mary.</Paragraph> <Paragraph position="5"> Fred recognized \[the building\] and \[Fred\] walked towards the building. I Since conjunctions can support such a wide range of ellipsis, it is generally impractical to recognize such utterances by appropriate grammar extensions. Efforts to deal with conjunction have therefore depended on general mechanisms that supplement the basic parsing strategy, as in the LUNAR system \[19\], or that modify the grammar temporarily, as in the work of Kwasny and Sondheimer \[13\]. We have not attempted to deal with this type of ellipsis in our parsing system, and will not discuss further the type of flexibility it requires.</Paragraph> </Section> </Section> <Section position="4" start_page="0" end_page="0" type="metho"> <SectionTitle> 2.7 Interjected Phrases, Omission, and Substitution </SectionTitle> <Paragraph position="0"> Sometimes people interject noise or other qualifying phrases into what is otherwise a normal grammatical flow as in: I want the message dated I think June 17 Such interjections can be inserted at almost any point in an utterance, and so must be dealt with as they arise by flexible techniques.</Paragraph> <Paragraph position="1"> It is relatively straightforward for a system of limited comprehension to screen out and ignore standard noise phrases such as &quot;I think&quot; or &quot;as far as I can tell&quot;. More troublesome are interjections that cannot be recognized by the system, as might for instance be the case in Display \[just to refresh my memory\] the message dated June 17.</Paragraph> <Paragraph position="2"> I want to see the message \[as I forgot what it said\] dated June 17.</Paragraph> <Paragraph position="3"> where the unrecognized interjections are bracketed. A flexible parser should be able to ignore such interjections. There is always the chance that the unrecognized part was an important part of what the user was trying to say, but clearly, the problems that arise from this cannot be handled by a parser.</Paragraph> <Paragraph position="4"> Omissions of words (or phrases) from the input are closely related to cryptic input as discussed above, and one way of dealing with cryptic input is to treat it as a set of omissions. However, in cryptic input only inessential information is left out, while it is conceivable that one could also omit essential information as in: Display the message June 17 Here it is unclear whether the speaker means a message dated on June 17 or before June 17 or after June American Journal of Computational Linguistics, Volume 7, Number 4, October-December 1981 235 Philip J. Hayes and George V. Mouradian Flexible Parsing 17. (We assume that the system addressed can display things immediately, or not at all.) If an omission can be narrowed down in this way, the parser should be able to generate all the alternatives (for contextual resolution of the ambiguity or for the basis of a question to the user). If the omission can be narrowed to one alternative then the input was merely cryptic.</Paragraph> <Paragraph position="5"> Besides omitting words and phrases, people sometimes substitute incorrect or unintended ones. Often such substitutions are spelling errors and should be caught by the spelling correction mechanism, but sometimes they are inadvertent substitutions or uses of equivalent vocabulary not known to the system. This type of substitution is just like an omission except that there is an unrecognized word or phrase in the place where the omitted input should have been. For instance, in &quot;the message over June 17&quot;, &quot;over&quot; takes the place of &quot;dated&quot; or &quot;sent after&quot; or whatever else is appropriate at that point. If the substitution is of vocabulary that is appropriate but unknown to the system, parsing of substituted words can provide the basis of vocabulary extension. Wilks \[17\] has developed techniques for relaxing semantic constraints when they are apparently violated by relations implied by the input, as in the previous example, where &quot;June 17&quot; and &quot;the message&quot; do not fit the normal semantic constraints of the &quot;over&quot; relation.</Paragraph> <Section position="1" start_page="0" end_page="0" type="sub_section"> <SectionTitle> 2.8 Agreement Failure </SectionTitle> <Paragraph position="0"> It is not uncommon for people to fail to make the appropriate agreement between the various parts of a noun or verb phrase as in : I wants to send a messages to Jim Smith.</Paragraph> <Paragraph position="1"> The appropriate action is to ignore the lack of agreement, and Weischedel and Black \[16\] describe a method for relaxing the predicates in an ATN grammar which typically check for such agreements. However, it is generally not possible to conclude locally which value of the marker (number or person) for which the clash occurs is actually intended.</Paragraph> </Section> <Section position="2" start_page="0" end_page="0" type="sub_section"> <SectionTitle> 2.9 Idioms </SectionTitle> <Paragraph position="0"> Idioms are phrases whose interpretation is not what would be obtained by parsing and interpreting them constructively in the normal way. They may also not adhere to the standard syntactic rules. Idioms must thus be parsed as a whole in a pattern matching kind of mode. Parsers based purely on pattern matching, like that of PARRY \[14\], are able to parse idioms naturally, while others must either add a preprocessing phase of pattern matching as in the LUNAR system \[19\], or mix specific patterns in with more general rules, as in the work of Kwasny and Sondheimer \[13\].</Paragraph> <Paragraph position="1"> Semantic grammars \[4, 11\] provide a relatively natural way of mixing idiomatic and more general patterns.</Paragraph> <Paragraph position="2"> In normal human conversation, once something is said, it cannot be changed, except indirectly by more words that refer back to the original ones. In interactively typed input, there is always the possibility that a user may notice an error he has made and go back and correct it himself, without waiting for the system to pursue its own, possibly slow and ineffective, methods of correction. With appropriate editing facilities, the user may do this without erasing intervening words, and, if the system is processing his input on a word-by-word basis, may thus alter a word that the system has already processed. A flexible parser must be able to take advantage of such user-provided corrections to unknown words, and to prefer them over its own corrections. It must also be prepared to change its parse if the user changes a valid word to another different but equally valid word.</Paragraph> <Paragraph position="3"> 3. An Approach to Flexible Parsing Most current parsing systems are unable to cope with most of the kinds of grammatical deviation outlined above. This is because typical parsing systems attempt to apply their grammars to their inputs in a rigid way, and since deviant input, by definition, does not conform to the grammar, they are unable to produce any kind of parse for it at all. Attempts to parse more flexibly have typically involved parsing strategies to be used after a top-down parse using an ATN \[18\] or similar transition net has failed. Such efforts inelude the ellipsis and paraphrase mechanisms of LIFER \[11\], the predicate relaxation techniques of Weischedel and Black \[16\], and several of the devices for extending ATN's proposed by Kwasny and Sondheimer \[13\]. An important exception to this observation is the case of parsers, including HEARSAY-II \[9\] and HWIM \[20\], designed for spoken input with its inherent low-level uncertainty. HWIM, in particular, incorporates techniques to apply an ATN in a bottom-up style, and thus can capitalize on whatever points of certainty it can find in the input. Fragmentary input, however, is typically the only type of ungrammaticality dealt with by speech parsers.</Paragraph> <Paragraph position="4"> In the remainder of this paper, we outline an approach to parsing that was designed with ungrammatical input specifically in mind. We have embodied this approach in a working parser, called FlexP, which can apply its grammar to its input flexibly enough to deal with most of the grammatical deviations discussed in the previous section. We should emphasize, however, that FlexP is designed to be used in the interface to a restricted-domain system. As such, it is intended to work from a domain-specific semantic grammar, rather than one suitable for broader classes of input. FlexP thus does not embody a solution for flexible parsing of natural language in general. In describing FlexP, we 236 American Journal of Computational Linguistics, Volume 7, Number 4, October-December 1981 Philip J. Hayes and George V. Mouradian Flexible Parsing will note those of its techniques that seem unlikely to scale up to use with more complex grammars with wider coverage.</Paragraph> <Paragraph position="5"> We have adopted in FlexP an approach to flexible parsing based not on ATN's, but closer to the pattern matching techniques used in the PARRY system \[14\], possibly the most robust natural language processing system yet constructed. At the highest level, the design of FlexP can be characterized by the following three features: * pattern matching: This provides a convenient way to recognize idioms, and also aids in the detection of omissions and substitutions in non-idiomatic phrases.</Paragraph> <Paragraph position="6"> * bottom-up rather than top-down parsing: This aids in the parsing of fragmentary utterances, and in the recognition of interjections and restarts.</Paragraph> <Paragraph position="7"> * parse suspension and continuation: This is important for dealing with interjections, restarts, and implicit terminations.</Paragraph> <Paragraph position="8"> In the rest of this section, we examine and justify these design characteristics in more detail, and in the process, give an outline of FlexP's parsing algorithm.</Paragraph> </Section> <Section position="3" start_page="0" end_page="0" type="sub_section"> <SectionTitle> 3.1 Pattern Matching </SectionTitle> <Paragraph position="0"> We have chosen to use a grammar of linear patterns rather than a transition network because pattern matching meshes well with bottom-up parsing, because it facilitates recognition of utterances with omissions and substitutions, and because it is ideal for the recognition of idiomatic phrases.</Paragraph> <Paragraph position="1"> The grammar of the parser is a set of rewrite or production rules; the left-hand side of one of these rules is a linear pattern of constituents (lexical or higher level) and the right-hand side defines a result constituent. Elements of the pattern may be labelled optional or allow for repeated matches. We make the assumption, certainly true for the grammar we are presently working with, that the grammar will be semantic rather than syntactic, with patterns corresponding to idiomatic phrases or to object and event descriptions meaningful in some limited domain, rather than to general syntactic structures.</Paragraph> <Paragraph position="2"> Linear patterns fit well with bottom-up parsing because they can be indexed by any of their components, and because, once indexed, it is straightforward to confirm whether a pattern matches input already processed in a way consistent with the way the pattern was indexed.</Paragraph> <Paragraph position="3"> Patterns help with the detection of omissions and substitutions because in either case the relevant pattern can still be indexed by the remaining elements that appear correctly in the input, and thus the pattern as a whole can be recognized even if some of its elements are missing or incorrect. In the case of substitutions, such a technique can actually help focus the spelling-correction, proper-name-recognition, or vocabulary-learning techniques, whichever is appropriate, by isolating the substituted input and the pattern constituent that it should have matched. The (often highly selective) restrictions on what can match the constituent can then be used to reduce the number of possibilities considered by these relatively expensive lexical correction techniques.</Paragraph> </Section> <Section position="4" start_page="0" end_page="0" type="sub_section"> <SectionTitle> 3.2 Bottom-Up Parsing </SectionTitle> <Paragraph position="0"> Our choice of a bottom-up strategy is based on our need to recognize isolated sentence fragments. If an utterance that would normally be considered only a fragment of a complete sentence is to be recognized top-down, there are two straightforward approaches to take. First, the grammar can be altered so that the fragment is recognized as a complete utterance in its own right. This is undesirable because it can cause enormous expansion of the grammar, and because it becomes difficult to decide whether a fragment appears in isolation or as part of a larger utterance, especially if there is the possibility of missing end-of-sentence markers. The second option is for the parser to infer from the conversational context what grammatical category (or sequence of sub-categories) the fragment might fit into, and then to do a top-down parse from that sub-category. This essentially is the tactic used in the GUS \[3\] and LIFER \[11\] systems.</Paragraph> <Paragraph position="1"> This strategy is clearly better than the first one, but has two problems: first, of predicting all possible sub-categories which might come next, and secondly, of inefficiency if a large number are predicted. Kwasny and Sondheimer \[13\] use a combination of the two strategies by temporarily modifying an ATN grammar to accept fragment categories as complete utterances at the times they are contextually predicted.</Paragraph> <Paragraph position="2"> Bottom-up parsing avoids the problem of trying to predict what grammatical sub-category a sentence fragment should be parsed into. The data-driven nature of bottom-up parsing means that any sub-category can be parsed as an isolated unit in exactly the same way as a complete sentence, so that no prediction about what sub-category to expect is necessary. On the other hand, if a given input can be parsed as more than one sub-category, a bottom-up approach has no good way of distinguishing between them, even if only one would be predicted top-down.</Paragraph> <Paragraph position="3"> In a system of limited comprehension, fragmentary recognition is sometimes necessary because not all of an input can be recognized, rather than because of intentional ellipsis. Here, it may not be possible to make predictions, and bottom-up parsing has a clear advantage. As described below, bottom-up strategies, American Journal of Computational Linguistics, Volume 7, Number 4, October-December 1981 237 Philip J. Hayes and George V. Mouradian Flexible Parsing coupled with suspended parses, are also helpful in recognizing interjections and restarts.</Paragraph> <Paragraph position="4"> While well suited to parsing fragmentary input, pure bottom-up parsing (as, for instance, described by Chester \[7\]) can result in the generation of an unnecessarily large number of intermediate structures that cannot form part of a completed parse. To reduce these inefficiencies, FlexP does not require all elements of a pattern to be present before including the pattern in the parse structure, and is thus similar to the left-corner algorithm also described by Chester. (For greater detail see Aho and Ullman \[1\].) In fact, FlexP is more restrictive than the left-corner algorithm. In normal left-to-right processing, if a new word is accounted for by a pattern that has already been partially matched by previous input, other patterns indexed by the new word are not considered as possible matches for that word. This is a heuristic designed to limit the number of partial parses that need to be investigated, and could lead to missed parses, but in practical experience, we have not found this to be a problem. Exactly how this heuristic operates will be made clear by the description of the parsing algorithm in the following section.</Paragraph> </Section> <Section position="5" start_page="0" end_page="0" type="sub_section"> <SectionTitle> 3.3 Parse Suspension and Continuation </SectionTitle> <Paragraph position="0"> FlexP employs the technique of suspending a parse with the possibility of later continuation to help with the recognition of interjections, restarts, and implicit terminations. To make clear what this means, it is first necessary to sketch the operation of the parsing algorithm as a whole. This will also serve to clarify the discussion of bottom-up parsing in the previous section. Examples of the algorithm in action are given in Section 4.</Paragraph> <Paragraph position="1"> FlexP's parsing algorithm maintains a set of partial parses, each of which accounts for the input already processed but not yet accounted for by a completed parse. The parser attempts to incorporate each new input word into each of the partial parses by one of the following methods: 1. fitting the word directly into one of the pattern slots available for matching at the right-hand edge of the partial parse; 2. finding a chain of non-terminal grammar sub-categories that allow the word to fit indirectly at the right-hand edge of the partial parse; 3. finding a common super-category of the input word and the sub-category at the top of the partial parse, so that the partial parse can be extended upwards and the input word will then fit into it by either method 1 or 2 above; 4. same as 1, but based on flexible pattern matching; 5. same as 2, but based on flexible pattern matching; 6. same as 3, but based on flexible pattern matching.</Paragraph> <Paragraph position="2"> Flexible pattern matching is explained in Section 4. As the description of method 3 implies, FlexP does not build the partial parses any higher than is necessary to account for the input already processed. In particular, FlexP does not try to build each partial parse up to a complete utterance unless a complete utterance is needed to account for the input seen so far. Which of the six methods is used to incorporate the new word into the existing set of partial parses is determined in the following way. The parser first tries method 1 on each of the partial parses. For each of them, it may succeed in one or more than one way or it may fail. If it succeeds on any of them, the ones on which it fails are discarded, the ones on which it succeeds are extended in all the ways that are possible, the extensions become the new set of partial parses for possible extension by the next input word, and the other five methods are not tried. If method 1 fails for all partial parses, the same procedure is repeated for method 2, and so on. If no partial parse can be extended by any of the six methods, the entire set of partial parses is saved as a suspended parse, and the input is used either to start a completely new set of partial parses, or to extend a previously suspended parse. Clearly, the policy of not attempting the more complicated methods if the simpler methods succeed can result in some parses being missed. However, in practice, we have found it heuristically adequate for the small domain-specific grammar we have been using, and much more efficient than trying all methods regardless of the outcomes of the others. On the other hand, if completeness became important, it would be simple to change FlexP always to try all methods. There are several possible explanations for input mismatch, i.e. the failure of an input to extend the currently active set of partial parses.</Paragraph> <Paragraph position="3"> * The input could be an implicit termination, i.e. the start of a new top-level utterance, in which case the previous utterance should be assumed complete, * The input could be a restart, in which case the active parse should be abandoned and a new parse started from that point.</Paragraph> <Paragraph position="4"> * The input could be the start of an interjection, in which case the active parse should be temporarily suspended, and a new parse started for the interjection.</Paragraph> <Paragraph position="5"> 238 American Journal of Computational Linguistics, Volume 7, Number 4, October-December 1981 Philip J. Hayes and George V. Mouradian Flexible Parsing It is not possible, in general, to distinguish between these cases at the time the mismatch occurs. If the active parse is not at a possible termination point, then input mismatch cannot indicate implicit termination, but may indicate either restart or interjection. It is necessary to suspend the active parse and wait to see if it is continued at the next input mismatch. On the other hand, if the active parse is at a possible termination point, input mismatch does not rule out interjection or even restart. In this situation, our algorithm tentatively assumes that there has been an implicit termination, but suspends the active parse anyway for subsequent potential continuation.</Paragraph> <Paragraph position="6"> Finally, it may be worthwhile to note why we implemented FlexP to operate in a breadth-first mode, carrying ambiguous alternative parses along in parallel, rather than investigating them individually depth-first. This choice follows naturally from a decision to parse each input token immediately after it is typed, which in turn follows from our desire to deal with implicit termination of input strings (see Section 2.4). A breadth-first approach allows the parser to make best use of the time during which the user is typing. A depth-first implementation could postpone consideration of some alternatives until the input had been terminated by the user. In such cases, unacceptably long delays might result. Note that the possibility of implicit termination also provides justification for the strategy of parsing each input word immediately after it is typed. If the input signals an implicit termination, then the user may well expect the system to respond immediately to the input thus terminated.</Paragraph> </Section> </Section> class="xml-element"></Paper>