Method and apparatus for interactive document preparation using a natural language
This application is a continuation, of application Ser. No. 07/689,510, filed Apr. 23, 1991, now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention relates to an information processing system which allows the user to input data and instructions for various kinds of processing without using complicated commands. 
     2. Description of the Prior Art 
     Heretofore, in an information processing system, such as a computer or the like, instructions for executing a program desired by the user must have been previously defined commands, such as &#34;run&#34;, &#34;compile&#34; and the like, or must have had the form of a set of program statements described in a computer language, such as Basic, Fortran or the like. 
     Recently, methods have been studied wherein commands are input using a natural language by providing a processing unit capable of understanding a natural language in an interface of an information processing system. 
     However, when using program statements as instructions in the above-described conventional information processing system, a high-level knowledge of programming is required of the user. Even when using only pre-defined commands, it is necessary to understand and memorize the commands. 
     On the other hand, when commands are input using a natural language, the user need not learn a computer language since he can utilize a commonly used language. However, it is rather difficult from a technical point of view to construct (particularly when the object of the use is general) an interface which makes it possible to input commands by a natural language. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to provide an information processing system which can perform processing in specified fields by inputting commands using a natural language. 
     It is another object of the present invention to provide an information processing system which can input commands according to interactive processing using a natural language. 
     It is still another object of the present invention to provide an information processing system which can process various kinds of commands input using a natural language without having a high proficiency in understanding the natural language. 
     According to one aspect, the present invention achieves these objectives using an information processing system comprising input means for inputting information/commands from a user, processing means for performing processing according to the information/commands input by the input means, storage means for correspondingly storing kinds/attributes of information needed to be input for the processing by the processing means, and questions to be provided from the system to the user in order to obtain the information, data base means for storing kinds/attributes, meanings and related information of various kinds of information, output means for providing the user with a question stored in the storage means, referring means for referring to the stored contents of the data base means relating to information input to the input means in response to the question from the output means, comparison means for comparing a kind/attribute of the response information which is determined as a result of reference by the referring means with a kind/attribute of information expected in response to the question from the output means, and control means for controlling the processing means according to a result of comparison by the comparison means. 
     Other objectives and advantages besides those discussed above shall be apparent to those skilled in the art from the description of a preferred embodiment of the invention which follows. In the description, reference is made to accompanying drawings, which form a part thereof, and which illustrate an example of the invention. Such example, however, is not exhaustive of the various embodiments of the invention, and therefore reference is made to the claims which follow the description for determining the scope of the invention. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a system block diagram of an information processing apparatus according to the present invention; 
     FIG. 2 is a flowchart for preparing a letter; 
     FIG. 3 is a flowchart for data check; and 
     FIG. 4 illustrates a dialogue between a user and a system. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     A preferred embodiment of the present invention will now be explained with reference to the drawings. 
     FIG. 1 is a block diagram of an information processing system according to the present invention. 
     In FIG. 1, an input unit 1 (IN) comprises a keyboard, a mouse and the like, and is used for the input of information/commands from the user. 
     A read-only memory 2 (ROM) stores various kinds of processing procedures including processing procedures shown in flowcharts of FIGS. 2 and 3 (to be described later), fixed data and the like. A random access memory 3 (RAM) includes areas used as work memories. 
     Data base 4 (DB) stores kinds, attributes, meanings, related information and the like of various kinds of information, and can update its contents. In the present embodiment, a model of a dialogue between a user and a system (to be described later) according to the present invention is also stored in the DB. 
     A central processing unit 6 (CPU), for example, reads data from the ROM, RAM, DB and the like, determines data (i.e., determines which of the information in the data base coincides with the information received in response to a question), and controls respective units. 
     An output unit 5 (OUT), which comprises a display unit, a printer and the like, provides the user with questions, and outputs results of processing. 
     an explanation will now be provided of the processing operation of the information processing system of the present invention, using a system of preparing a letter according to information from the user. In this system, information relating to the property and contents of the letter to be written is obtained from the user, and the letter is prepared in accordance with the information. 
     In the above-described system, the present invention is applied in the form of obtaining various kinds of information (the receive, the sender, the object of the letter, and the like) to be utilized in preparing the letter from the user in response to individual questions for each information, according to a model of questions from a system and responses from a user for preparing a letter. It is thereby possible to receive responses from the user in the form of short answers, and to prevent inputs of sentences of a natural language (for example, ordinary long English sentences) by the user. Accordingly, the system need not truly understand a natural language to extract useful information from sentences. 
     Next, an explanation will be provided of specific processing with reference to flowcharts shown in FIGS. 2 and 3, illustrating a dialogue between a user and a system shown in FIG. 4. 
     First, in FIG. 4, processing for preparing a letter is started according to &#34;letter&#34;in item 1. Next, in item 2, a message &#34;Hello! Can I write/help you to write any letter?&#34; is displayed, and asks about the sender of the letter to be prepared by displaying a message &#34;May I known, who the letter shall be from?&#34;. In general, the user=the sender, but the sender does not always coincide with the user, since a secretary may, for example, write a letter in place of her employer (the above-described items belong to step S1). Next, in item 3, &#34;Aruna&#34; input as a variable &#34;reply --  name&#34; is set to a variable &#34;sender --  name&#34; as a response to the question (steps S2-S3). The system then executes a subprogram &#34;data --  chk&#34; (step S4). The flow of &#34;data --  chk&#34; is shown in FIG. 3. Suppose that the following entries are found at step S101. 
     
         ______________________________________                                    
         Name     Aruna                                                   
         Surname  Rohra                                                   
         Affiliation                                                      
                  Canon Inc.                                              
         Working on                                                       
                  nl processing                                           
         --         --                                                    
         --         --                                                    
         --         --                                                    
______________________________________                                    
 
    
     In the present case, since &#34;Aruna&#34;, serving as reply --  name, is present in the data base as Name, properties required for variables coincide with each other. In the foregoing entries, &#34;nl processing&#34; indicates &#34;natural language processing&#34;. The above-described information is stored in a work memory (step S103). In other words, the subprogram &#34;data --  chk&#34; determines which of the information stored in the data base means coincides with the information received in response to the question. In item 4, together with a message &#34;Thank you&#34;, the receiver of the letter is obtained by asking the following question: &#34;Whom shall the letter be addressed to?&#34; (step S5). A message &#34;Schank&#34; in item 5, serving as the reply for the question, is provided as &#34;reply --  name&#34;, is set to &#34;receiver --  name&#34;, and &#34;data --  chk&#34; is executed again (step S8). Since the value &#34;Schank&#34; of &#34;reply --  name&#34; is not found in the data base at step S101, a message &#34;Sorry, I don&#39;t know that person&#34; is displayed in item 6, and a question &#34;Is that his surname?&#34; is asked according to the knowledge possessed by the data base that a person is often called by his surname in a letter. Since an answer &#34;Yes&#34; for the question is obtained in item 7, a question &#34;What&#39;s his name?&#34; is asked in item 8, and an answer &#34;Roger&#34; in item 9 is obtained. Based on knowledge about first names, the system concludes that Roger is a male, and so can be represented by the word &#34;he&#34; in the letter. Accordingly, in item 10, a message &#34;I see&#34; is displayed. If an input first name is an unknown first name, and the system cannot determine the sex of the person, the system asks the user about the sex of the person, and ads obtained information to the data base as knowledge. In item 10, the system requests information for preparing a data base for Roger according to a question &#34;Where does he work? Could you please give me his address as well, so that I don&#39;t have to ask you for it later?&#34;. In item 11, an address &#34;Yale University. Dept. of Computer Science Yale, New Haven, Conn., USA&#34; is input (the data base may be structured so that &#34;New Haven, Conn., USA&#34; is obtained from &#34;Yale University&#34;. Furthermore, if it is structured so that the correct address can be obtained, the address may be used as the address of the receiver). In item 12, a message &#34;Thank you&#34; is displayed. Subsequently, in order to input a &#34;work&#34;, the system presumes, from the model for preparing a letter that the sender and the receiver have in general a common interest, that, in this case, nl processing is the field of work, that is, the &#34;work&#34; of the receiver is the same as that of the sender. Hence, the system asks a question &#34;I presume he works on nl processing. OK?&#34;. Since the question is affirmed by &#34;Yes&#34; in item 13, the information is stored as his work in the data base, and is also stored in a work memory (the above-described items belong to steps S102, S104 and S105). 
     Subsequently, in item 14, the object of the letter is asked by the question &#34;What is the letter to be about?&#34;. At that time, objects stored in &#34;goals --  list&#34; of the data base are shown by &#34;It would be easy for me to know, which one of the following--Get Information, Visit him, Schedule a meeting, - - - &#34;, and the user is anticipated selecting one of the provided objects. Since an answer &#34;Visit him&#34; in item 15 is present in &#34;goals --  list&#34; (steps S10-S11), a message &#34;OK. I&#39;ll try to write the letter now; please wait&#34; is displayed in item 16. At step S13, the preparation of the letter is executed according to the input information. If an input in item 15 is not present in &#34;goals --  list&#34;, the fact is displayed (step S12), and another input is awaited. 
     As explained above, according to the present invention, since the user can input information in the form of short answers using a commonly-used language even if he does not have knowledge about commands, an input method is simplified. 
     Also on the system side, since a &#34;true&#34; analysis of a natural language is not needed, it is possible to reduce the amount of programs which have previously been needed for processing a natural language input.