Abstract:
The present invention relates to a connection matrix used for syntactic processing and is aimed at providing an apparatus for creating a connection matrix with enhanced accuracy of estimate. The apparatus features a likelihood calculating section that obtains said transition likelihood from a word sequence to a word, an entropy calculating section that obtains the entropy of each entry sequence using said transition likelihood, and an entry renewal section that renews entry sequences having greatest entropy with new entry sequences by adding each one of the words to the end of them.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to methods and apparatus for creating a connection matrix to be used for syntactic processing such as automatic speech recognizer and word processors. 
     2. Description of the Related Art 
     Recently systems such as speech automatic speech recognizers and word processors employing syntactic processing techniques have been widely used. 
     The language processing section of a automatic speech recognizer has usually a function that stores information about words (lexicon), and a function that estimates likelihood of correctness of a sequence of words by referring to a connection matrix. If the likelihood of a sequence is defined as a probability, which takes a value between 0 and 1, then the creation of a connection matrix becomes easy, and the following conventional example is based on this definition. The probability, or likelihood, that the word w(i) follows the sequence of words w(1)·w(2) . . . w(i-1) is hereafter denoted by P{w(i) | w(1)·w(2) . . . w(i-1)}. If the number of unique words is M, then the number of unique sequences of w(1)·w(2) . . . w(i-1) is M i-1 . Therefore, it is almost impossible to register all probabilities for possible different sequences. However, by the (N+l)-gram approximation of the following formula (1), the number of registered probabilities can be limited to M N+1 . 
     
         P{w(i) | w(1)·w(2) . . . w(i-1)}≈P{w(i) | w(i-N)·w(i-N+1) . . . w(i-1)}         (1) 
    
     FIG. 6 shows a block diagram of conventional apparatus for creating a connection matrix. In FIG. 6, a reference numeral 111 denotes a learning data storage section, which gathers and stores various sequences of words beforehand. 112 denotes a likelihood calculation section that obtains the transition likelihood or probability P{w(i) | w(i-N)·w(i-N+1) . . . w(i-1)} for each sequence w(i-N)·w(i-N+1) . . . w(i-1) using data stored in the storage section 111. 113 denotes a connection matrix, which is the set of all transition probabilities obtained by the section 112 and becomes the output of this apparatus. 
     The conventional apparatus organized as above obtains the transition likelihood from the sequence w(i-N)·w(i-N+1) . . . w(i-1) to the symbol w(i) by calculating the following formula (2). 
     
         P{w(i) | w(i-N)·w(i-N+1) . . . w(i-1)}=n{w(i-N) . . . w(i-1)·w(i)}/n{w(i-N) . . . w(i-1)}              (2) 
    
     Here, n{w(i-N) . . . w(i-1)·w(i)} is the total number of sequences w(i-N) . . . w(i-1)·w(i) contained in the learning data stored in the storage section 111, and n{w(i-N) . . . w(i-1)} is the total number of sequences w(i-N) . . . w(i-1) contained in the learning data stored in the storage section 111. 
     Although the above method reduces the total number of registered likelihoods to M N+1 , it still can not register all likelihoods if it raises the number M N+1  in order to increase the accuracy of the estimate. 
     SUMMARY OF THE INVENTION 
     The object of the present invention is therefore to provide an apparatus for creating a connection matrix with higher accuracy of estimate than the conventional one while limiting the total number of registered likelihoods to that of the conventional one. 
     In order to achieve the aforementioned objective, according to the present invention, there is provided an apparatus for creating a connection matrix, each element of which is a transition likelihood from a leading sequence of words to a subsequent word, comprising a learning data storage section for storing various sequences of words, a likelihood calculating section for calculating the transition likelihood from a leading sequence of words to a subsequent word for all indexes and subsequent words picked up from said various sequences of words stored in said learning data storage section, an entropy calculating section for calculating entropies for every index using transition likelihoods calculated by said likelihood calculating section and finding entropies larger than a predetermined threshold value and an index renewal section for renewing indexes having entropies found in the foregoing step by adding corresponding subsequent symbol to the end of each of said indexes. 
     According to a further aspect of the present invention, there is provided a method for creating a connection matrix, each element of which is a transition likelihood from a leading sequence of words to a subsequent words, comprising steps of calculating the transition likelihood from a leading sequence of words to a subsequent word for all indexes and subsequent words picked up form various sequences of words stored beforehand, calculating entropies for every index using transition likelihoods calculated in the foregoing step, finding entropies having values larger than a predetermined threshold for every index and renewing indexes by corresponding subsequent word to each of indexes with said entropies having found in the foregoing step. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     These and other objects and features of the present invention will become clear from the following description taken in conjunction with the preferred embodiment thereof with reference to the accompanying drawings throughout which like parts are designated by like reference numerals, and in which: 
     FIG. 1 shows a block diagram of the apparatus for creating a connection matrix according to a preferred embodiment of the present invention; 
     FIG. 2 shows a flow chart of creating a connection matrix in the preferred embodiment; 
     FIG. 3 shows the connection matrix obtained by initial setting in the preferred embodiment; 
     FIG. 4 shows the connection matrix obtained by calculating transition likelihoods in the preferred embodiment; 
     FIG. 5 is a graph showing a relationship between the entropy and number of indexes according to the present invention; 
     FIG. 6 shows a block diagram of conventional apparatus for creating a connection matrix. 
     FIG. 7 shows a block diagram of an apparatus for creating a connection matrix according to another embodiment of the invention; 
     FIG. 8 shows a flow chart of creating a connection matrix according to the block diagram of FIG. 7; 
     FIG. 9 shows a block diagram of an apparatus for creating a connection matrix according to yet another embodiment of the invention; and 
     FIG. 10 shows a flow chart of creating a connection matrix according to the block diagram of FIG. 9. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     The preferred embodiment according to the present invention will be described below with reference to the attached drawings. 
     FIG. 1 shows a block diagram of the apparatus for creating a connection matrix of the preferred embodiment according to the present invention. In FIG. 1, a reference numeral 1 denotes a learning data storage section, which gathers and stores a number of sentences (word sequences) beforehand to be used as data for learning. A reference numeral 2 denotes a likelihood calculating section, which obtains the transition likelihood that a word w(i) follows a leading word sequence w(i-N)·w(i-N+1) . . . w(i-1) using the learning data stored in the learning data storage section 1. Since the likelihood means a probability as in the conventional apparatus, the probability that the word w(i) follows the word sequence w(i-N) . . . w(i-1), which is denoted by P{w(i) | w(i-N) . . . w(i-1)}, is the transition likelihood. A reference numeral 3 denotes a connection matrix, which is the set of all likelihoods obtained by the likelihood calculating section 2 and is the output of the present apparatus. A reference numeral 4 denotes an entropy calculating section, which calculates entropies for every index which defines a leading sequence of words picked up from the learning data and selects entropy values larger than a predetermined threshold value among the entropies for every index. A reference numeral 5 denotes an index renewal section which renews indexes by compositing respective subsequent symbols with each index if their combinations have larger entropies selected by said entropy calculation section. 
     The procedure of creating a connection matrix by means of the embodiment organized as above will be described below with reference to FIG. 2. In the following, the counter of each index will be denoted by j, the index having counter j will be denoted by W j , and the upper bound of the total number of indexes will be denoted by j --  max (j=1, 2, . . . , j --  max). 
     Step 1. In the beginning, all indexes are initialized by allocating each index to a single word of words w 1 , w 2 , . . . , w M  included in the learning data wherein M is the total number of unique words (vocabulary size) included therein. Therefore, if the current total number of entry sequences is denoted by j --  curr, then j --  curr=M. The connection matrix in this initial setting is shown in FIG. 3. 
     Step 2. The transition likelihood P{w k  |W j  } that the word w k  follows the word sequence W j  is calculated for j=1, 2, . . . , j --  curr and k=1, 2, . . . , M by the following equation (3) using the learning data stored in the data storage section 1. 
     
         P{w.sub.k |W.sub.j }=n{W.sub.j ·w.sub.k }/ n{W.sub.j }(3) 
    
     where n{W j  w k  } is the total number of occurrences of the word sequence W j  ·w k  in the learning data, and n{W j  } is the total number of occurrences of the word sequence W j  in the learning data. The connection matrix obtained by Step 2 is shown in FIG. 4. 
     Step 3. If j --  max&lt;j --  curr, then the procedure goes to Step 7. 
     Step 4. The entropy H(j) for each word sequence W j  ·w k  is calculated for every index W j  (j=1, 2, . . . , j --  curr) by the following equation (4). ##EQU1## 
     Step 5. Among entropies for every index j, those having values larger than a predetermined threshold value Hth are found. 
     Step 6. Old indexes W j  are renewed with new ones W j  ·w k  when their entropies are found to be larger than Hth at step 6 and, at the same time, N j  and j --  curr are updated as N j  +1 and j --  curr-1+M, respectively. Thereafter, the procedure goes to step 2. 
     Step 7. The set of all transition likelihoods is output as a connection matrix. 
     In addition to the above, it is possible according to another embodiment of the invention to reduce j --  curr by executing the following procedures 2.1 to 2.3 after executing step 2. This embodiment is shown in block diagram form in FIG. 7 and in flow chart form in FIG. 8. 
     2.1 Forward transition likelihoods from all leading sequences of words to a subsequent word for all subsequent words are calculated according to the following equation (5). 
     
         P{w.sub.k |W.sub.j }=n(W.sub.j ·w.sub.k)/n(W.sub.j)(5) 
    
     wherein n(W j ), n(W j  ·w k ) denotes total numbers of occurrences regarding sequences of words W j  and W j  ·w k , respectively. 
     2.2 Each distance between indexes j1 and j2 is calculated according to the following equation (6). ##EQU2## 
     If the distance thus calculated is smaller than a predetermined threshold value dth (d(j1, j2)&lt;dth), the indexes W j1  and W j2  are renewed with one index W j1  ∪W j2 . 
     2.3 Likelihoods are recalculated according to the equation (3) using indexes renewed in the procedure 2.2. 
     Alternatively, it is possible according to another embodiment of the invention to reduce j --  curr by executing the following procedures 2.4 to 2.6 after executing step 2. This embodiment is shown in block diagram form in FIG. 9 and in flow chart form in FIG. 10. 
     2.4 Backward transition likelihoods from a leading sequence of words to all subsequent words for all leading sequences of words are calculated according to the following equation (7). 
     
         P(w.sub.i |W.sub.j)=n(w.sub.i ·W.sub.j) /n(W.sub.j)(7) 
    
     wherein n(W j ) and n(w i  ·W j ) denotes total numbers of occurrences regarding sequences of words W j  and w i  ·W j , respectively. 
     2.5 Each distance between indexes j1 and j2 is calculated according to the equation (6). 
     If the distance calculated is smaller than a predetermined threshold dth, the indexes W j1  and W j2  are renewed with W j1  ·W j2 . 
     2.6 Likelihoods are recalculated according to the equation (3) using indexes renewed in the procedure 2.5. 
     Accordingly, The present invention has the following advantages. 
     (1) Since it generates indexes from those having high entropies, it creates a connection matrix having high accuracy while limiting the total number of indexes and registered likelihoods. 
     (2) Since renewal of indexes is performed by finding indexes having a short distance therebetween, the total number of indexes can be reduced while increasing data volume per index and, accordingly, the estimation accuracy of the connection matrix can be highly enhanced. 
     Although the present invention has been fully described in connection with the preferred embodiment thereof with reference to the accompanying drawings, it is to be noted that various changes and modifications are apparent to those skilled in the art. Such changes and modifications are to be understood as included within the scope of the present invention as defined by the appended claims unless they depart therefrom.