File Information
File: 05-lr/acl_arc_1_sum/cleansed_text/xml_by_section/metho/90/c90-3098_metho.xml
Size: 10,259 bytes
Last Modified: 2025-10-06 14:12:31
<?xml version="1.0" standalone="yes"?> <Paper uid="C90-3098"> <Title>USING THE SAME SYSTEM FOR ANALYZING AND SYNTHESIZING SENTENCES</Title> <Section position="5" start_page="0" end_page="0" type="metho"> <SectionTitle> 2, ADVANTAGES OF GUIDED COMPOSITION </SectionTitle> <Paragraph position="0"> We may distinguish two kinds of conununication with natural language interfaces : - a &quot;free&quot; mode : the user types sentences without knowing the limits of the interface but he hopes it will understand him. Trivial reality : user's freedom will always be the freedom the system will grant him.</Paragraph> <Paragraph position="1"> - a guided mode : the system guides the user while he composes sentences (guided composition).</Paragraph> <Paragraph position="2"> Unlike the &quot;free&quot; mode, with guided composition users quickly perceive the limits of the interface. The designer doesn't have to program all the expressions or structures having the same meaning. Unique forms and structures are sufficient. He may forget the others. A user-friendly interface with a guided composition mode must lead users towards non ambiguous formulations, as in Leader. So, it is not necessary to produce paraphrases for want of clarification from the user. We give now an example of a session with Leader.</Paragraph> <Paragraph position="3"> In this application, the system interfaces a database that contains information regarding Nobel Prizes. (The original session is in French).</Paragraph> <Paragraph position="4"> The user types : Give the ...</Paragraph> <Paragraph position="5"> By a mere cursor return, the user asks to be guided. And Leader synthesizes expected expressions following the word Next step : the user selects received and decides to continue without may assistance until the conjonction and : Give the person who received the Nobel prize of Physics in 1921 and ...</Paragraph> <Paragraph position="6"> At tiffs point, Leader synthesizes : his~her age his/her nationality in Aad the user completes his question : Give the person who received the Nobel prize of Physics in 1921 and his~her nationality ?</Paragraph> </Section> <Section position="6" start_page="0" end_page="0" type="metho"> <SectionTitle> 3. PROBLEMS BOUND TO PARTIAL SYNTHESIS </SectionTitle> <Paragraph position="0"> After the last word of an fimompleted sentence composed by the user, Leader's grammar runs in synlhesis and produces a list of possible following words or expressions. The main problem of this kind of synthesis (we call it partial aynthesis) is that a word (or an expression) that has been synthesized by the system (and selected by the user to compose his sentence) must not lead to a fim~re dead end. For exmnple, ,after a noun phrase tile system may synthesize the relative pronoun who if and only if, in the application domain, there is a verb that can take this noun phrase as subject. If there is no such a verb, the relative pronoun who must not be synthesized.</Paragraph> <Paragraph position="1"> One can avoid dead ends by developping a semantical grm~unar with symbols reflecting the semantics of the application domain like in Tennant's menu-based system \[Tennant 1984\]. This is not the case with Leader. Leader is a generator of nalural lmlguage interfaces. Leader's grammar is portable to different domains. Symbols reflect linguistical properties. Associated to particular symtx~ls, general conditions access to the sem~mtic model of the application domain. Because of the partial synthesis problem, calls to these conditions must be placed in tim granmaar before concerned symbols. Their evaluation is done before the rewriting of symbols.</Paragraph> <Paragraph position="2"> The following simplified rules (in a DCG style) ilh~slrate the principle involved in the synthesis (or not) of a relative pronoun. The general condition possible_case takes the concept associated to the noun ~md verifies if it can be a case (agent, object, etc.) of a verb. Only the different values of possiblecase are dependant of the application domain.</Paragraph> <Paragraph position="4"> incomplete sentence(Ccas'e,Verb).</Paragraph> <Paragraph position="5"> relative(Concept) --> \[1.</Paragraph> <Paragraph position="6"> Another problem of partial synthesis is the problem of variable symbols. By variable symbols, we mean words or expressions that are not defined in the lexicon of the system because they are too numerous or infinite, llke integers, dates, or proprer norms for exmnple. If these expressions txzlong to those following a given word, one can't synttmsize them. In this case, Leader produces a message expliciting the type associated to the expected expressions. For example, after the incomplete question : Give the persons who received the Nobel prize of Physics before...</Paragraph> <Paragraph position="7"> Leader will synthesize : <enter a year, example .&quot; 1945> <enter a person, example : Einstein> Concerning variable symlmls, Leader displays messages when running in synflmsis, but collects and parses expressions when running in analysis.</Paragraph> <Paragraph position="8"> The right placement of calls to conditions in the granunar (not to lead to a dead end), and the management of variable symbols were the two major problems we encountered and solved with partial synthesis.</Paragraph> </Section> <Section position="7" start_page="0" end_page="0" type="metho"> <SectionTitle> 4. PRINCIPLES OF ANALYSIS-SYNTHI,~SIS </SectionTitle> <Paragraph position="0"> The potential reversibility of certain programs written in Prolog is well known. So, in order to facilitate the implementation of a granm~ar rmming tx~th in m~alysis and in synthesis, we have decided to program Leader in this language. The core of the system is a Metamo~hosis Grmnmar \[Colmerauer 1975\] using immediate Prok;g strategy : top-down, left-to-right, depth- first, non-detemfinistic.</Paragraph> <Paragraph position="1"> In order to synthesize all the possible expressions following a given word, the granm'tar must contain no cuts (and no negation by failure). For example, the two following</Paragraph> <Paragraph position="3"> diflX, Y) is the coroutine built-in predicate thai controls at all times the validity of the inequalion between X and Y. It fails as soon as X and Y become equal, and tile prognun backtracks.</Paragraph> <Paragraph position="4"> We give now file principles of our analysis-synthesis algorithm. To each word typed by the user (or selected by him in the synthesized list), one associates an integer corresponding to its position in the sentence. For example, for the question : 2. 441 Give the persons wtuo received the Nobel prize of Physics ? we will have the following association : Give (1) the (2) persons (3) who (4) received (5) the (6) Nobel (7) prize (8) of(9) Physics (10) ? (11) The algorithm needs an integer, called rightmost, whose value is the integer associated to the righmmst word accepted by the granunar in the user's sentence. At the beginning of the analysis-synthesis, the value of rigthmost is 0. rigthmost increases according to the words accepted, but rightmost never decreases : backtracking in the application of grammar rules has no effect on rightmost. The algorithm needs another integer, called current, whose value is the integer associated to the current word to be analysed in the sentence. At the beginning of the analysis-synthesis, the value of current is 0. current increases according to the words accepted, but also can decrease when backtracking occurs in the application of grammar rules. For a given complete or incomplete user's sentence, rules of grammar are applied until terminal symbols. When a terminal symbol must be applied, the following (meration is done. If the terminal symbol expected by the grammar rule matches with ~e current word of the sentence, we have the following sit,ration : If current > righttru'zgt, then, we do : ri@gmos: := currem&quot; Clt/'ren\[ ~:: clgrretg &quot;+&quot; i else, we do:</Paragraph> <Paragraph position="6"> I f the terminal symbol 1&quot; expected by the grmmnar rule doesn't match with the current word of the gr~mm'Lar, the situation is : If current < righztm-)st then we do nothing, else, we record T as ~m expected word instead of tire cmTent word in the sentence.</Paragraph> <Paragraph position="7"> At the end, if the analysis succeexts, the users's sentence is accepted. If it fails, we display the user's sentence until the word W whose associated integer has the value of rightmost, and we display all the terminal symbols T recorded as possible words fol!owing W. Then, the user selects an expected word and comp!etes or not his sentence. And the sentence is analysed from tim beginning.</Paragraph> <Paragraph position="8"> As we mention it above, calls to conditions may occur in a grammar rule. Their evaluation can produce several solutions, it is in fact the nature of the words encountered that limik~ the nunlber of solutions. The partial synthesis imposes to place may condition in a grammar rule before the concerned symbol in order to evaluate the condition before the rewriting of the symbol. This method is not efficient when the rewriting of the concerned symbol leads to a part of the sentence yet accepted. The evaluation of the condition could be done after.</Paragraph> <Paragraph position="9"> So, for each call to a condition that may occur in a giammar rule, we place it before and after the concerned symbol. The condition will be evaluated before if : current = rightmz~st and after if : current < rightmost Cohnerauer first, within tire natural language interface to a database on planets, Orbis \[Colmerauer and Kittredge 1982\], used the same grammar for analyzing sentences and synthesizing expected words after an erroneous ont. Our algoritlun differs from Orbis'one on the following points. We introduce and manage variable symbols. We don't re-analyze the incomplete (or erronexms) sentence for synthesizing expected words : we do it in one pass. Efficiency in time is better by evaluating conditions before or after the concerned symbols according to the values of current and righlmost.</Paragraph> </Section> class="xml-element"></Paper>