Method and apparatus for analyzing the syntactic structure of a sentence
BACKGROUND OF THE INVENTION 
     The present invention relates to a syntax analyzing system and, more particularly, to a method and apparatus for analyzing the syntax of a natural language which is applied and inputted to a natural language processing system including a computerized translation system. 
     A computerized natural language-processing system, such as a machine translation system or computerized translation system, has been recently developed. In such a language processing system, a sentence input to a machine has been automatically analyzed using the syntax of an English system and an output document has been formed and edited in accordance with the analyzed result. 
     When the syntax analysis of the original sentence input to the machine is performed, the syntactic category of each word forming the input sentence is generally obtained by using a dictionary memory. The dictionary memory stores in advance definitions of numerous words and their syntactic categories, such as nouns, verbs, prepositions and the like. The syntatic analysis of the input sentence is processed based on the syntactic category thus obtained from all of the words included in the input sentence and the rules of grammar. 
     However, it is generally impossible to register in advance all of the words which may be needed to form a sentence in the dictionary of the machine. When a word unregistered in the dictionary is, accordingly, included in the sentence input to the machine, it cannot determine the syntatic category of the word. Therefore, it becomes impossible to perform the actual syntactic analysis of the input sentence. Consequently, the fact that the processing of such a sentence is interrupted and cannot be continued is a drawback of the conventional natural language-processing system. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to provide a new and improved syntax analyzing method and apparatus capable of performing the syntactic analysis of an input sentence, even when the input sentence includes words unregistered in a dictionary, and which can prevent the interruption of language processing. 
     According to the present invention, the dictionary words corresponding to a plurality of words (input words) arranged in accordance with predetermined grammar rules are respectively retrieved according to a dictionary consulation when a natural language sentence, formed of the input words is input. When the dictionary word corresponding to the input word is registered in advance in a dictionary section, a syntactic category belonging to the dictionary word is applied to the input word. When words unregistered in the dictionary section are included in the input sentence, the application of the syntactic category based on dictionary consultation fundamentally becomes impossible. In this case, the unregistered word is compared with the unregistered word in the input sentence by assuming from the category data prepared in advance and it is analyzed, whether the unregistered word satisfies the grammar rules or not. In this manner, even if unknown words are included in the input sentence, the syntactic analysis of the input sentence can be continued. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The present invention is best understood with reference to the accompanying drawings, in which: 
     FIG. 1 is a block diagram schematically showing the construction of the essential part of a computerized automatic translation machine preferably applied with the present invention; 
     FIG. 2 is a model diagram for describing a syntax analyzing method, in accordance with one preferred embodiment of the present invention, performed on a sample input sentence applied to the input section of an automatic translation machine as shown in FIG. 1, in which the simple input sentence is constructed only with words registered in the dictionary memory of FIG. 1; 
     FIG. 3 is a diagram for describing a syntax analyzing method of the above embodiment of the present invention, performed with reference to another sample input sentence applied to the input section of FIG. 1, in which a other sample input sentence is constructed with the word (unknown word) unregistered in the dictionary memory shown in FIG. 1; and 
     FIG. 4 is a flowchart showing the entire construction of a syntax analyzing method of the above one embodiment of the present invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring now to FIG. 1, there is schematically illustrated a computerized natural language-translation system for automatically translating the English language input into a given target language, such as the Japanese language, which system is preferably applied to the present invention. An input section 2 which receives an input language source is connected to a dictionary consultation section 4. This section 4 analyzes the input language into words and consults dictionary information stored in advance in a dictionary memory 6, so as to obtain the corresponding meaning in the above target language for every word and the syntactic category. The memory 6 stores the comparison of the meanings between the input language and the target language and syntactic category data on the input language, such as noun, verb, preposition and the like, in a format corresponding to an ordinary dictionary format. The dictionary consulation section 4 is connected to a syntax analyzer 8 provided in a language processing section 10. A language grammar memory 12 is connected to the analyzer 8. This memory 12 stores rules of grammar. The analyzer 8 is connected to a translation section 14. This section 14 automatically converts an input language into an expression compatible with the target language. The translated result thus obtained in the section 14 is outputted through a target language generator 16. 
     The case wherein an input sentence such as &#34;I READ A BOOK&#34;, which is shown in FIG. 2, is input to the section 2 in FIG. 1, may now be described. In this case, the input sentence information is transferred to the section 4 in which the information is decomposed into five parts, i.e., the first part &#34;I&#34;, the second part &#34;READ&#34;, the third part &#34;A&#34;, the fourth part &#34;BOOK&#34; and the fifth part &#34;.(punctuation mark)&#34;. Regarding the above four words, the syntactic categories are obtained by the dictionary consulation of the memory 6. When the four words included in the above input sentence are all stored in the memory 6, the syntactic category data of these words is prepared in the memory 6. Accordingly, the application of the syntactic category for each word of the above input sentence is performed by retrieval and, hence, the dictionary consultation of the dictionary memory 6. 
     The types of syntactic categories stored, together with the meanings of the words in the memory 6, are illustrated with their corresponding data names in the 
     
                       TABLE                                                       
______________________________________                                    
PARTS OF SPEECH      DATA NAME                                            
______________________________________                                    
noun                 N                                                    
transitive verb      VT                                                   
intransitive verb    VI                                                   
adjective            ADJ                                                  
auxiliary verb       AUX                                                  
conjunction          CNJ                                                  
preposition          PRE                                                  
pronoun              PN                                                   
interjection         INT                                                  
article              DET                                                  
relative pronoun     RP                                                   
relative adjective   RA                                                   
interrogative pronoun                                                     
                     IP                                                   
interrogative adverb IA                                                   
demonstrative adjective                                                   
                     DA                                                   
______________________________________                                    
 
    
     Accordingly, the syntatic category data PN which expresses a pronoun is applied to the first word &#34;I&#34; included in the input sentence by the dictionary consultation in section 4. Similarly, the syntactic category data VT, DET and N are respectively applied to the second word &#34;READ&#34;, the third word &#34;A&#34; and the fourth word &#34;BOOK&#34;. In other words, in this case, the syntactic categories are applied to all the words in the original sentence input to section 2 by the dictionary consultation. The syntactic category information of the words forming the input sentence thus obtained is supplied to the analyzer 8. 
     The syntactic analysis of the input sentence will be performed as described, in accordance with the above syntactic category information and the rules of grammar stored in advance in the memory 12. According to the grammar rules stored in the grammer memory 12, the high order word unit is prepared in summary from the words forming the allowable combination, based on the relationship between the syntactic category information of the finely classified word units, and this composition of the combination is repeated, to eventually recognize the structure of sentence. Accordingly, according to the rules of grammar, the combination illustrated in the following formulae will be allowed as a representative example. 
     
         DET+N→NP 
    
     
         DET+ADJ+N→NP                                        (1) 
    
     
         VT+NP→VP                                            (2) 
    
     
         PN+VP→S                                             (3) 
    
     Thus, in the input sentence &#34;I READ A BOOK.&#34;, which was input to section 2 in FIG. 2, for example, the above formula (1) is applied to the third word &#34;A&#34;, belonging to the syntactic category data DET, and the fourth word &#34;BOOK&#34;, belonging to the syntactic category data N. Consequently, as shown in FIG. 2, these words are combined so as to form the first upper order sentence unit NP. As a result, the relationship between the first upper order unit NP and the second word &#34;READ&#34; can be examined. Since the above formula (2) is applied therebetween, the first upper order sentence unit NP and the second word &#34;READ&#34; are combined as shown in FIG. 2, thereby forming the second upper order sentence unit VP. The syntactic category data of the remaining word and, hence, the first word &#34;I&#34; is PN, as described above, and satisfies the terms of the above formula (3) with reference to the second upper order sentence unit VP. Consequently, the combination of the word &#34;I&#34; and the second upper order sentence unit VP is allowed, thereby eventually obtaining the data S of the composition data of one sentence. Thus, the syntactic analysis of the above input sentence can be succeeded and the sentence structure can be detected. 
     The case wherein another input sentence, &#34;I THROW A BOOK.&#34;, as shown in FIG. 3, is applied to the section 2 (FIG. 1), may now be described. At this time, it is assumed that a word &#34;THROW&#34; included in this sentence is unregistered in the memory 6 in FIG. 1. Under such circumstances, according to the present invention, the syntactic category of the unregistered word in the dictionary is assumed to be as below. 
     When the dictionary consultation of the word &#34;THROW&#34; in the input sentence &#34;I THROW A BOOK.&#34; fails in section 4 shown in FIG. 1 (i.e., when this word cannot be discovered in the dictionary memory 6), the syntactic category of the above unregistered word is deduced by the analyzer 8, based on the syntactic category of the other words registered in the dictionary (&#34;I&#34;, &#34;A&#34; and &#34;BOOK&#34;). Similarly, since a combination of the words &#34;A&#34; and &#34;BOOK&#34;, as registered in the dictionary, is allowed, the first order sentence unit NP can first be obtained. Then, one of the parts of speech shown in the above Table is selected for the unregistered word and is examined to see whether or not this word satisfies the rules of grammar stored in the grammar memory 12. In this case, it is preferred to try the parts of speech in the order of their frequency of use. Thus, the syntactic category data N meaning noun is first applied as the syntactic category of the unknown word in the input sentence, and the syntactic analysis is performed according to the rules of grammar. 
     However, in this case, there is no rules which allows this combination with the first upper order sentence unit NP. As a result, the syntactic analysis performed in this case fails. In this manner, the analyzer 8 judges that the syntactic category assumed for the unknown word &#34;THROW&#34; was improper. 
     Then, the syntactic category data VT meaning a transitive verb from the parts of speech shown in the above Table is similarly selected and applied to the unknown words. When the syntactic analysis is performed with the syntactic category data VT applied to the unknown word &#34;THROW&#34;, the combination shown in the above formula (2) exists in the rules of grammar prestored in the grammar memory 12. Accordingly, the syntactic analysis is succeeded, thereby eventually obtaining the sentence data S. Thus, the analyzer 8 judges that the applied assumption of the above syntactic category data VT to the unknown word is correct. By way of summary, when a word unregistered in the dictionary memory 6 appears in the given original sentence, the syntactic category assumed for the word is sequentially applied, and is analyzed for its structure in each case. The syntactic analysis is repeated until a different syntactic category is applied to the unknown word and succeeds. It should be noted that a plurality of syntactic category data (N, VT, VI, ADJ, ...) expressed in the above Table as to the parts of speech are preferred to be registered in advance in a memory such as, for example, a specific memory location of memory 12. 
     The syntax analyzing method described above is summarized in the flowchart in FIG. 3. The computerized natural language-translation system in FIG. 1 is constructed to include a microcomputer (not shown) programmed to execute the syntax analysis shown in the flowchart in FIG. 4. 
     In FIG. 4, when an original sentence (input sentence) to be analyzed is input through the input section 2, the dictionary consultation section 4 and the syntax analyzer 8 start operating and, hence, begin the syntax analyzing program. In step 20, the dictionary memory 6 which registers a number of words and their syntactic category (parts of speech) information is retrieved by the section 4 for each word forming the input sentence. After this dictionary consultation is finished, it is judged in step 22 whether syntactic categories will need to be applied to all of the words included in the input sentence, or not. When it is confirmed by this judgement that the syntactic categories are to be applied to all of the words, i.e., that the input sentence does not include the word(s) unregistered in the memory 6, the input sentence is supplied to the analyzer 8, in which the syntactic analysis is performed based on the actual arrangement relation in the sentence between the above syntactic categories and the grammatical regulations prestored in the grammar memory 12 (step 24). 
     On the other hand, in step 22, when an unknown word, i.e., a word for which a corresponding syntactic cateqory does not exist in the input sentence, due to the presence of an unregistered word in the dictionary, a pointer is applied to the parts of speech (syntactic category) disposed initially in the above Table (step 24). This step 24 corresponds to the step of starting to assume the syntactic category of the word(s) unregistered in the dictionary memory 6. Subsequently, in step 26, the parts of speech (syntactic category) selected by the pointer are applied to the unknown word in the input sentence and, in step 28, the confirmation of the propriety of applying the syntactic category, i.e., the syntactic analysis is performed. The analysis in step 28 is performed in a manner substantially similar to the syntax analyzing method of step 24. Thereafter, in step 30, the propriety of applying the category is judged. When the category application procedure is performed in such a way that the rules of grammar are satisfied, i.e., successfully; in step 32, the result is stacked and is transferred to step 34, which consists of searching the Table of the parts of speech. When the application (assumption) of the category does not satisfy the rules of grammar in step 30, i.e., when it fails, step 32 is directly skipped and step 34, which consists of searching the parts of speech, is performed. In step 34, the parts of speech are searched for the word in question (i.e., the word in the above Table of the category). In step 36, it is determined whether or not there are other (remaining) parts of speech in the Table, based on the search results of step 34. When there are other parts of speech in the Table, the position of the pointer in the Table is displaced by one to step 38. Subsequently, other parts of speech are read out from the Table, and the above steps 26, 28, 30, 32 and 34 are repeated. In step 36, this process is repeated until there is no remaining part of speech. In the meantime, the results of the applied categories are stacked at every juncture of the syntactic analysis. 
     In step 36, when it is confirmed that there is no remaining part of speech in the Table (i.e., that all parts of speech given in the Table are sequentially applied as parts of speech to be assumed for the unknown words in the input sentence and the completion of the respective syntactic analysis is confirmed), it is transferred to step 40, the successful analysis results thus stacked so far are all output, thereby completing the syntactic analysis. In this case, when a plurality of collations of the category are successful for one unknown word in the input sentence or one unregistered word in the dictionary memory 6, all of these analyzed results are output. 
     According to the syntax analyzing method of the present invention, as described above; even when the input sentence includes words that are not registered in the dictionary, syntactic analysis of the input sentence can be performed by assuming the syntactic category of the unknown word(s). Accordingly, when the input sentence includes even one unregistered word in the dictionary as in the conventional case, it can prevent the complete stoppage of syntactic analysis of the input sentence. In other words, it can effectively prevent the drawback resulting from an interruption of all language processing, due to the production of a state of impossible syntactic analysis, such as that created by unknown words within the input sentence. Accordingly, it can effectively and efficiently perform syntactic analysis of a sentence of wide range. Further, an increase in the capacity of the memory of the storing dictionary can be minimized and the natural language processing to be performed can be effectively executed by using the memory cells of the present capacity. 
     Particularly when the present invention is applied to a computerized automatic translation machine; even when the original sentence includes terms or words which are not registered in the dictionary, at least the syntactic category thereof can be effectively recognized. Consequently, the worst state to be encountered; a state wherein the translation itself is interrupted, due to production of an unknown word, and wherein continued processing becomes impossible, may be avoided. 
     Although the present invention has been shown and described with respect to a particular embodiment, various changes and modifications, which are obvious to a person skilled in the art to which the invention pertains, are deemed to lie within the spirit and scope of the invention. 
     For example, in the above embodiment, a grammar which has a rewriting regulation of the format for eventually recognizing one sentence by sequentially combining the words of the minimum unit forming a sentence and forming the upper order sentence unit has been employed. However, the present invention is not limited to the grammar of this type. For example, other types of grammar, to include augmented transition network grammar, case grammar, definite clause grammar, or the like, may be employed. Further, the output priority sequence applied when the assumed syntactic category data obtained from the Table of the parts of speech (syntactic category Table) are output may follow the sequence of words which are used frequently in the input sentence. 
     Moreover, the present invention has been described with respect to the computerized automatic translation system. However, the present invention is not limited to this alone. For example, the present invention may be applied widely to a computer, or the like, of the type directly inputting another natural language processing system, such as the direct input of natural language.