Abstract:
Index terms are drawn from text documents without the need for language-specific processes or training and are suitable as gists for the subject documents. Index terms are extracted on the basis of scores of constituent n-grams relative to n-gram counts in a corpus. A method of extracting joint index terms to represent a plurality of documents is also provided.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
     This application is related to U.S. patent application Ser. No. 07/932,522, filed 20 Aug. 1992, now abandoned, entitled &#34;METHOD OF IDENTIFYING, RETRIEVING, AND SORTING DOCUMENTS&#34; and assigned to the assignee of the present application. 
    
    
     CROSS-REFERENCE TO RELATED APPLICATIONS 
     This application is related to U.S. patent application Ser. No. 07/932,522, filed 20 Aug. 1992, now abandoned, entitled &#34;METHOD OF IDENTIFYING, RETRIEVING, AND SORTING DOCUMENTS&#34; and assigned to the assignee of the present application. 
     BACKGROUND OF THE INVENTION 
     This invention relates to the field of information retrieval, and more specifically to the field of automatic generation of index terms for text samples. 
     BRIEF DESCRIPTION OF THE PRIOR ART 
     For more than four decades, research in the automated processing of textual information has flourished. Much of that research has centered on information retrieval. Early workers in the newly-emerging field of information science recognized the value of having index terms to act as document surrogates for the purpose of selection. Moreover, computers of the time imposed severe limitations on processing memory, peripheral storage, and processing speed, making operation on the shorter proxies a necessity. It was quickly recognized that manual assignment of index terms would make processing in bulk impractical, and methods of machine assignment of index terms drawn from the text saw intense investigation. Vindication of that work has come in studies that show comparable--and sometimes superior--performance of automated over manual selection and assignment of index terms. 
     The explosion of machine-readable text and the desire for more general document sorting, indexing, perusal, and retrieval has maintained interest in automated generation of indexing terms. However, today&#39;s computers have made full-text searching a reality, and there is some evidence that machine retrieval based on index terms is losing user favor to full-text indexing, in part because of information overload, the deluge of documents netted by queries. 
     The large volume of documents returned from typical queries, either from full-text indexing, subject searching, or other means, argues for tools enabling easy selection and perusal of the returned documents. This is a point at which lists of automatically-generated index terms could be used to select among retrieved documents, particularly when dealing with data sets in which titles or abstracts are not guaranteed to exist. These lists of index terms may act as gists--abbreviated abstracts for user browsing and selection. While there are many other uses of index terms, the present invention has particular application to this problem. 
     The desire to operate over arbitrary languages and domains precludes the use of any syntactically-based systems, let alone those that employ semantic analysis. Moreover, many commonly-employed devices cannot be used for such broad application. 
     It is widely held that the selection of index terms should use a stemmer to reduce words which differ only by suffixes to the same root, thereby permitting such words to reinforce each other in scoring. Removing the suffixes also unifies the vocabulary, increasing the likelihood of matches for document comparison and reducing the number of redundant terms. Stemming algorithms are, of course, language- and domain-specific. Further, they miss other substring matches, such as the match of &#34;earthquakes&#34; with &#34;quake.&#34; 
     Most approaches to assigning index terms employ a thesaurus to accomplish the same purposes as a stemmer, but for words that bear no resemblance. Certainly thesauri are impractical unless the domain of operation is constrained. Thesauri are obviously language-dependent. 
     Finally, most automatic indexing systems employ a stop-word list to cull the most common and uninformative words from documents--an action so routine that descriptions of indexing algorithms often fail to mention it. This operation is also language-specific. Moreover, a stop-word list may be domain-dependent, for if a corpus is limited to a single domain of a language, an appropriate stop-word list should include the words common throughout that domain. 
     Numerous methods for extracting index terms have been proposed. These require the use of one or more language-dependent components. 
     Counting of character n-grams has long been a component in information science methods. Such methods have been in the areas of storage compression, spelling error detection and correction, string searching, prediction, and information retrieval, including the use of n-grams as index terms. Other uses of n-gram counts in information retrieval have not attempted to extract index terms. Rather, the n-gram counts are used to measure the similarity between whole documents for language and topic sorting. An example of this use is disclosed in the Schmitt U.S. Pat. No. 5,062,143. 
     While the prior methods have been used satisfactorily, they have certain limitations which are overcome by the present invention wherein index terms are drawn from text documents without the need for language-specific processes or training. 
     SUMMARY OF THE INVENTION 
     Accordingly, it is a primary object of the present invention to provide a method for generating index terms from sample text relative to background text including the steps of filtering background text to remove undesired symbols, resulting in filtered background text; counting the n-grams in the filtered background text to produce background n-gram counts; filtering the sample text to remove undesired symbols, resulting in filtered sample text; counting the n-grams in the filtered sample text to produce sample n-gram counts; comparing the sample n-gram counts to the background n-gram counts to produce n-gram scores; assigning to each symbol of the filtered sample text a symbol score derived from the n-gram scores, the symbol score being derived from the scores of the n-grams containing the symbol; determining a symbol score threshold; and extracting as index terms the words and phrases of the filtered sample text that contain symbols whose symbol scores exceed the symbol score threshold. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     Other objects and advantages of the invention will become apparent from a study of the following specification when viewed in the light of the accompanying drawings, in which: 
     FIG. 1 is a flow chart illustrating the steps of a preferred embodiment of the method for constructing background n-gram counts; 
     FIG. 2 is a flow chart illustrating the steps of a preferred embodiment of the method for extracting index terms from a sample document; and 
     FIG. 3 is a flow chart illustrating the steps of a preferred embodiment of the method for extracting joint index terms from a plurality of sample documents. 
    
    
     DETAILED DESCRIPTION 
     In accordance with the invention, a document under study is represented by a vector detailing the number of times an n-gram is observed. However, before processing a document to extract index terms, a background must be built. This background serves to characterize the average text in the corpus against which index terms will be formed. In practice, the background corpus usually contains the document under examination, though this is not mandatory. For purposes of this description, the background consists of the n-gram counts of the corpus treated as a single, long document. One background may then serve for extracting index terms for as many documents as desired. Note that the index terms are relative to the documents used to form the background; changing the breadth of the corpus serves to change the specificity of the index terms. 
     FIG. 1 illustrates a preferred embodiment of the method for producing the background representation. In step 1, at the discretion of the user, the background text is filtered to remove unwanted characters, resulting in filtered background text. Typically, punctuation and numerals are replaced by stop characters flanked by blanks. (In later stages, n-grams containing stop characters are ignored, so that n-grams will not span sentences, etc.). Inserting a space on either side of the stop character assures that words appearing with adjacent punctuation will have the same context as those that do not. Formatting codes (such as carriage returns) may be treated in the same way or replaced by blanks. Following this, consecutive blanks are replaced by a single blank. In addition, case transformation is made, converting small letters to capitals. Filtering and transformation may be changed to accommodate other languages that use special codes for diacritics, use multiple bytes per character (such as Chinese and Japanese), or don&#39;t have different cases. 
     In step 2, exhaustive n-gram counts on the aforementioned filtered background text are accumulated, resulting in the background n-gram counts. The method of counting the background n-grams is identical to the method of sample n-gram counting, and is described below in step 12. 
     FIG. 2 illustrates the generation of index terms from a text sample. In step 11, at the discretion of the user, the sample text is filtered to remove unwanted characters, resulting in filtered sample text. Typically, punctuation and numerals are replaced by stop characters flanked by blanks. (In later stages, n-grams containing stop characters are ignored, so that n-grams will not span sentences, etc.). Inserting a space on either side of the stop character assures that words appearing with adjacent punctuation will have the same context as those that do not. Formatting codes (such as carriage returns) may be treated in the same way or replaced by blanks. Following this, consecutive blanks are replaced by a single blank. In addition, case transformation is made, converting small letters to capitals. Filtering and transformation may be changed to accommodate other languages that use special codes for diacritics, use multiple bytes per character (such as Chinese and Japanese), or do not have different cases. 
     Operating on the filtered sample text, step 12 forms sample n-gram counts as follows: Let the filtered sample text be of length S with symbols s 1 , s 2 , . . . , s s . Fixing the positive integer n, define the jth n-gram g j  as the n-long subsequence of the text centered about the jth symbol: 
     
         g.sub.j =(s.sub.j-(n-1)/2, s.sub.j-(n-1)/2+1, s.sub.j-(n-1)/2+n-1). 
    
     (For even n, one may choose to round the subscripts either up or down, rounding in a consistent fashion.) In other words, an n-long window is slid along the text, and the pattern in the window is noted at each position of the window. The value of n typically ranges from 3 to 6, though it is not constrained to these values. 
     In practice, symbols s 1 , s 2 , . . . , s s  are bytes, rather than characters. The distinction only matters for multibyte characters. In this stage of the processing, the spectrum of n-grams is formed, recording each n-gram as it is observed by incrementing the appropriate count. If a stop character is found in the n-gram, the n-gram is not counted. While it appears that an alphabet of A possible symbols could produce A n  distinct n-grams, normal text contains far fewer (English text tends to contain on the order of 10 5  5-grams--much smaller than the possible 27 5  =1.4×10 7 ). For this reason, it is practical to accumulate the counts very quickly using a hash table, the preferred method. Using this method, an n-gram g j  is mapped to a table address κ(g j ) using some easily-computed hash function κ, which possesses pseudo-random properties including the mapping of all n-grams to a compact range of integers in a somewhat uniform fashion. 
     The n-gram counting step 2 of FIG. 1 operates in the same fashion on the background filtered text, accumulating the background n-gram counts. 
     Step 13 follows, and assigns n-gram scores to the sample n-gram counts by comparing them to respective background n-gram counts. These scores represent the novelty of the respective sample n-gram counts with respect to the background n-gram counts. The sample n-gram counts are denoted by the vector C=(C 1 , C 2 , . . . , C N ), where a representative count C i , i=1, 2, . . . , N, is the number of {g j  } equal to the ith possible n-gram value. Similarly, let the background n-gram counts have corresponding denotation B=(B 1 , B 2 , . . . , B N ) with a total count of R=ΣB i . A G 2  statistic for indicating the novelty of the ith n-gram is ##EQU1## When computing Ψ i , one defines x ln x evaluated at x=0 to be zero. The score vector Ψ=(Ψ 1 , Ψ 2 , . . . , Ψ N ) comprises the n-gram scores. 
     An alternative, chi-squared score is ##EQU2## which may be substituted for the aforementioned Ψ i , respectively. 
     From the n-gram scores, each symbol in the filtered text is now assigned a score in step 14. The preferred method of assigning symbol scores is to give the jth symbol the score of the n-gram g j . Thus, each time an n-gram occurs in the filtered sample text, its score is vested only in the symbol in the center of n-gram. This means that a high-scoring n-gram will give its high score to only words containing the center of the n-gram. For larger n, one may choose to distribute the n-gram score over the symbols in the n-gram, perhaps giving more weight to those symbols nearer the center. 
     Note that assigning the symbol scores requires a second pass through the filtered sample text. During this pass, the n-long window is again passed along the text, each n-gram is hashed to get the address of the score for that n-gram, and the symbol scores are recorded in a vector Z of size equal to the filtered text length. When this pass is completed, the jth score in the symbol score vector will be 
     
         z.sub.j =Ψ(g.sub.j), 
    
     where Ψ(g) denotes the score for n-gram g. (Much of the work, namely the hashing, may be avoided the second time by keeping the hashed sample text from the first pass.) 
     The selection of words is based on selecting significantly-scoring symbols, which is, in turn, based on comparison to a symbol score threshold. Step 15 chooses the symbol score threshold, for which several methods are available. Static absolute thresholds may be used, as well as statistics based on the n-gram count scores. Preferred results are obtained by examining the symbol scores and selecting a threshold that is a given number of sample standard deviations above the mean in practice, the user prescribes a threshold of δ standard deviations. The score threshold τ is then set using the first two sample moments of the symbol scores: ##EQU3## Typically, δ is chosen in the neighborhood of 2. 
     Next, in step 16, words and phrases from the filtered sample text are extracted based on the contained symbol scores and the symbol score threshold. A word is a string of consecutive symbols which is separated from the adjoining symbols by specified delimiters, usually spaces. The delimiters are not considered part of the word. (Other schemes of defining &#34;words&#34; are appropriate for languages that do not have such simple cues, as in Japanese. In the case of Japanese, nominal word separation is accomplished by dividing at the junctures of kanji, katakana, hiragana, and other characters.) 
     A word is recognized as significant if at least one of its symbols has a score equal to, or exceeding, the symbol score τ. If a word is found to be significant, it is selected as an index term. Similarly, if a significant n-gram spans two words, then the combination of those words is significant. Two adjacent words are joined as a phrase, including the common delimiter, if the symbols on either side of the delimiter jointly contribute to a significantly scoring n-gram. This is determined by examining the symbol scores which resulted from n-grams that included both the delimiter and the symbols to either side of it. Any number of consecutive words may be joined in this fashion as a single index term. 
     Optionally, as part of step 16, an index term score may be calculated. The index term score is based on the number of times an index term is observed in the filtered sample text and on the scores of the index term&#39;s symbols at each instance. There are many appropriate methods for computing such a score. For each instance of the index term in the filtered sample text, define an index term instance score as the numerical average of the symbol scores of the symbols contained in the instance of the index term. A preferred index term score is the sum of the index term instance scores for that index term. 
     Finally, in step 17, the index terms may be sorted, either alphabetically, or by their index term scores, or by other criteria. The index terms may also be presented with their respective index term scores. 
     Joint index terms for a plurality of documents may be defined. These index terms, while differentiating the chosen plurality of documents from the background, are also index terms &#34;common&#34; to all chosen documents. The index terms apply to the whole plurality in the sense that the following conditions are satisfied: (A) the index terms apply to the document formed by concatenating the individual documents; but, (B) only n-grams which are significant to every document in the plurality are considered. The method of extracting joint index terms for a plurality of documents is similar to the method for a single document and augmented by several extra steps. 
     Before examining the sample documents, background counts must be accumulated from background text by the method described above and illustrated in FIG. 1. 
     The method for generating joint index terms for a plurality of documents is illustrated in FIG. 3. 
     Step 21 establishes an absolute intersection n-gram score threshold τ 0 , which is used for forming the intersection of significant n-grams. This preliminary threshold is generous enough to permit small contributions to pass, while rejecting scores that exhibit no novelty. The threshold may be specified as some number of standard deviations above the mean under the hypothesis that the n-gram count is drawn from the same distribution as the background. With the large sample approximation, this threshold is ##EQU4## where τ 0  specifies the desired number of standard deviations. In practice, the value of 
     
         δ.sub.0 =δ/3, 
    
     is appropriate, that is, the intersection threshold, in standard deviations, is set to one third of the symbol score threshold in standard deviations. 
     As part of initialization, a master (cumulative) n-gram count table is zeroed (step 22). Further, all n-grams in the table are marked as candidates (step 23). 
     For each sample document in the plurality of sample documents, steps 25 through 29 are then performed. In step 25, the document is filtered, removing extraneous characters such as punctuation and numbers as in step 11 above. Next (step 26), the sample n-gram counts are formed, as in step 12 above, from the filtered sample text, resulting in the sample n-gram counts. In step 27, the sample n-gram counts are added to the master n-gram counts for later use. In the next step (step 28), for each n-gram that is still a candidate, its associated sample n-gram count is compared to the respective background n-gram count, resulting in a score, using the method described in step 13. Step 29 examines these scores for each candidate n-gram, and if the score falls below the intersection n-gram score threshold τ 0 , the n-gram is marked as not being a candidate. 
     In step 30, the master n-gram counts are now scored in a manner similar to step 13, but the candidacy of each n-gram is also considered: For each n-gram that is still a candidate, its master n-gram count is compared to the corresponding count in the background, resulting in a score which is recorded with that n-gram entry as in step 13 above. Each n-gram that is no longer a candidate is given a score of zero. 
     In preparation for generating joint index terms for the plurality of sample documents, step 31 clears the master index term list. This list will eventually hold the index terms. 
     Next, for each sample document in the plurality of sample documents, steps 33 through 36 are performed. They are as follows: In step 33, from the master n-gram scores calculated in step 30, each symbol in the filtered sample text is assigned a score using the method of step 14. Step 34 establishes a symbol score threshold according to the method of step 15. Next, in step 35, words and phrases from the filtered sample text are extracted as sample index terms, with their scores, based on the contained symbol scores and the symbol score threshold. This is done in accordance with the procedure described in step 16. In step 36, index terms extracted in step 35, together with their scores, are merged into the master index term list for all documents. Index term scores are added during merger. 
     The final step, step 37, sorts the master index term list in accordance with the procedure outlined in step 17. 
     The master n-gram scores are derived from the entire plurality of sample documents, but are nonzero only if they are judged to be significant for every document in the plurality. As more n-grams are removed from candidacy the processing becomes faster in steps 28 and 29. 
     In accordance with the invention, an efficient method for generating index terms from sample text is provided with the terms being suitable for a gist of the sample text. The method requires no training beyond observing the text background corpus and is independent of the language or domain of the sample text. 
     Although an exemplary embodiment of the invention has been disclosed for purposes of illustration, it will be understood by those skilled in the art that modifications may be incorporated into such embodiment without departing from the spirit of the invention. In particular, the disclosed logical steps may be merged, separated, or performed in parallel, may be accelerated by methods well known to those skilled in the art, and may be implemented in hardware, software, or a combination thereof; further, maintenance and initialization tasks have been neglected in this disclosure, these tasks being obvious to those skilled in the art.