A process for extracting keywords

Abstract: A database of texts is provided; lexical elements (W i ) of the texts are listed in a dictionary, together with a number (NW i ) representative of the frequency of these elements in the texts; sequences (S j ) of the lexical elements in the texts are listed in a collection. Then, the sequences of the collection are segmented into elements of the dictionary. Concatenations (C k ) of the elements of the dictionary forming the segmented sequences are listed; a number (NC k ) representative of the frequency of each concatenation in the database of texts is computed. Based on the number (NC k ) associated to a concatenation (C k ) of the collection of concatenation and on the numbers (NW i ) associated in the dictionary to the elements forming said concatenation, one computes a prediction of the variation of the sum of the costs of all elements of the dictionary if the concatenation were to be added to the dictionary; the cost of an element is computed as a decreasing and entropic function of the number (NW i ) associated to this element. If the sum of costs decreases, then the concatenation is added to the dictionary, else it is ignored. The process may be iterated for adding more elements to the dictionary; each iteration adds entries made of existing entries of the dictionary, thus forming hierarchical or structured keywords. The process extracts from the database of texts combinations of lexical elements that are meaningful in the texts.

Description: The invention relates to the field of information retrieval, and more specifically to keywords used for retrieving information from texts and text databases. It particularly applies to retrieval of information from the Internet. A number of searching tools exist for searching and retrieving information on the Internet. Alta Vista Company proposed an Internet search site, with a request box where the user may input keywords for retrieving information. The language of the search may be restricted. Other examples of searching tools are provided by Google and Yahoo. US-A-5 463 773 discloses the building of a document classification tree by recursive optimisation of keyword selection function. There is provided retrieval means for extracting keywords when a document data is inputted, and outputting a classification for the document data, the classification being selected among the classification decision tree. For extracting keywords, this document suggests extracting keywords defined by word sequences. A learning process is suggested for building automatically a document classification tree on the basis of the extracted keywords. The described process goal is to classify documents, and not to build key terms thesaurus. Key terms are used to describe documents, and so key terms quality is not a central issue. US-A-5 963 965 discloses a method where relevant sets of phrases are automatically extracted from text-based documents in order to build an index for these documents. These phrases are then grouped together in clusters to form a plurality of maps which graphically describe hierarchical relationships between the clusters, and can be used to extract relevant portions of the documents in answer to the user selecting one of these clusters. This patent, like the previous one, describes a collocation-based method. Another collocation-based method is disclosed in Y. Choueka, S.T. Klein, E. Neuwitz. 1983. Automatic retrieval of frequent idiomatic and collocational expressions in a large corpus. Journal of Literary and Linguistic Computing, 4:34-38.. Unsupervised Language Acquisition, Carl. G. de Marcken, Ph.D. thesis submitted to the Department of Electrical Engineering and Computer Science, MIT 1996, Chapter 5, discusses learning under the inference scheme as the searching for the grammar that minimises the combined length of the input and the grammar. It suggests using heuristic algorithms that iteratively update and improve a grammar (or a lexicon) by adding, deleting and otherwise manipulating parameters. The learning process is separated into a stage where the stochastic model is refined according to the lexicon, and a stage where the model is applied to the lexicon to find its underlying structure. The process is exemplified in its use for grouping letters into words; however, there is no discussion of the paradigm used for grouping letter. WO-A-99 27469 discloses a method for extracting key terms from a data set, each key term being a group of one or more words. There are suggested weighting strategies to rank key terms by relevance. Using stemmed word forms is also suggested : prefix and suffix may be ignored. But there is no suggested method to decide if a computed key term is indeed a linguistically coherent key term. US-B-6173 298 describes a method to build dynamic collocation dictionary. Well known methods for selecting bigrams are used. But the process is restricted to word-bigrams, so some further checking on key terms cannot occur: truncations of three word lenghted key terms may be selected as relevant bigrams. Thus, there is a need for a method for defining keywords, that applies to databases of texts and documents. In one embodiment, the invention suggests using an entropic method for defining keywords in a database of documents. Using an entropic method extracts keywords having a meaning in the database texts. Iterating the steps of the methods allows keywords to be built based on keywords already defined, in a hierarchical or structured way. More specifically, the invention provides a process for extracting keywords from a database of texts, comprising the steps of: (a) providing a dictionary of lexical elements (W i ) of texts of the database, an element in the dictionary being associated to a number (NW i ) representative of its frequency in said texts; (b) providing a collection of sequences (S j ) of lexical elements of texts of the database; (c) segmenting each sequence into elements of the dictionary ; (d) providing a collection of concatenations (C k ) of the elements of said segmented sequences; a concatenation in the collection being associated to a number (NC k ) representative of its frequency in said database of texts; (e) based on the number (NC k ) associated to a concatenation (C k ) of said collection of concatenation and on the numbers (NW i ) associated in the dictionary to the elements forming said concatenation, computing the variation of the sum of the costs of all elements of the dictionary if the concatenation were to be added to the dictionary, the cost of an element being computed as a decreasing and entropic function of the number associated to said element, and (f) adding said concatenation to the dictionary according to the results of said computation. The process may further comprise repeating the steps (c), (d) and (e). The lexical elements may be chosen among words, lemmas, sets formed of a word and an attribute thereof, or sets formed of a lemma and an attribute thereof. The step (a) of providing a dictionary may comprise selecting lexical elements among all lexical elements of texts of the database. In this process, a sequence may be an ordered set of lexical elements, or a set of lexical elements adjacent in a text of the database. The step of providing a collection of sequences can be carried out by extracting from texts of the database sequences having a length lower than a predetermined length (L max ). A concatenation in this process is preferably a set of elements of the dictionary adjacent in a segmented sequence, or an ordered set of elements of the dictionary present in a segmented sequence. In step (e), segmenting each sequence may comprise: (e1) determining all possible segmentations of a sequence into elements of the dictionary, and (e2) selecting one of said possible segmentations. In this case, the step of selecting may be carried out by (e21) computing the sum of the costs associated to the elements of the dictionary for each possible segmentation; (e22) selecting the segmentation with the smallest sum. Preferably, a sequence in the collection is associated to a number (NS j ) representative of its frequency in said texts and the number (NC k ) representative of the frequency of a concatenation (C k ) is computed as the sum of the numbers (NS j ) associated in said collection of sequences to sequences (S j ) containing said concatenation (C k ). The step of adding advantageously comprises: (f1) comparing the variation computed for a concatenation to the variation computed for other concatenations; and (f2) adding a concatenation to the dictionary according to the results of said comparison. The cost of a lexical element (W i ) of the dictionary may be computed as ln(NW i /NW) with NW i the number of occurrences of the lexical element in the database and NW the number of elements in the dictionary. In this case, the variation in step (e) may be computed as g(x) = - NC k . ln(NC k / NW) - (NW k1 - NC k + 1) . ln((NW k1 - NC k + 1)/NW) - (NW k2 - NC k + 1) . ln((NW k2 - NC k + 1) / NW) - ( - NW k1 . ln(NW k1 / NW) - NW k2 . ln(NW k2 / NW) ) where NW k1 and NW k2 are the numbers associated to the elements W k1 and W k2 forming the concatenation C k . One may also use in the database of texts a log of user's requests. It is also possible, for an entry of the dictionary, to provide a display form of the entry. In this case, the display form for an entry of the dictionary may be selected as the most frequent of all expressions or textual forms of the database of texts that correspond to said entry. A method embodying the invention will now be described, by way of example only, and in reference to the attached drawings, where figure 1 is a view of a dictionary for starting the process of an embodiment of the invention; figure 2 is a view of a collection of sequences used in an embodiment of the invention; figure 3 to 5 show a flowchart of a process according to the invention. The invention is based on the consideration that applying information theory to lexical elements in a database of texts entries makes it possible to extract from the database combinations of lexical elements that have a meaning in the texts. For the sake of simplicity, such combinations of lexical elements are designated as "keywords" in the rest of this specification; indeed, keywords are the primary use of such combinations of lexical elements. In this respect, lexical elements in the present specification comprise words, or lemmas; these are lexical elements, as opposed to letters or clusters of letters. For exemplifying the invention, there is considered in the rest of this specification a database of texts in the English language. The database is comprised of a number of entries; each entry is a text - that is an ordered collection of words in the English language. The invention is applied to the definition of keywords for searching this database and for allowing information to be retrieved from this database. The retrieval of information - the actual use of the keywords - is not the primary purpose of the present invention; it may be carried out by any method known in the art, and will not be discussed here. The process uses a dictionary. Each entry of the dictionary comprises a lexical element, or an element formed of lexical elements contained in the dictionary. The lexical element could be a word or a lemma of the database texts; an element formed of other elements may be a set of lemmas of the dictionary, ordered or not. Other examples are given below. In addition, each entry comprises a number. This number is the number of occurrences of the lexical element of the entry in the database. In the rest of this specification, NW i will denote the number of occurrences of lexical element or set of lexical elements W i . Although this is an abuse of language, one may refer in the rest of this specification to a lexical element as an "entry" of the dictionary - the entry being strictly speaking formed of the lexical element and of its associated number. The number NW i of occurrences of the entry W i makes it possible to compute a "cost" of this entry, using a function f that associates the cost to this number NW i . The function is chosen and the dictionary is built so as to verify the following properties: first, the function f is strictly decreasing; that is if NW k < NW j then f(NW k ) < f(NW j ); second, for an element of the dictionary formed of other elements of the dictionary, the cost of this element is lower than the sum of the costs of elements that form it. The fact that the function is decreasing reflects that the more frequent an element is, the smaller its cost should be. The second criterion is useful for selecting new entrres to be added to the dictionary - these entries being formed of entries already present in the dictionary; it thus helps completing the dictionary with new entries that are relevant. Let W 1 , W 2 , ..,Wn be entries of the dictionary, and NW 1 , NW 2 , ..., NW n the numbers respectively associated to these entries; let W 1+2+...+n a new element of the dictionary, formed of elements W 1 , W 2 , ...,W n and NW 1+2+...+n the number associated to W 1+2+..+n , let NW be the total of number of occurrences associated to entries. With these notations, the second criterion is summarised by the following formula : f(NW 1+2+...+n ) < f(NW 1 ) + f(NW 2 ) + ... + f(NW n ) that is, the cost NW 1+2+...+n of the combination W 1+2+...+n is lower than the combination of the costs NW 1 , NW 2 , ..., NW n of W 1 , W 2 , ..., W n . For instance, the following functions can be used for the entropic function: f(x) = - ln(x / NW) with NW the total number of occurrences, and x the number of occurrences of an element f(x) = 1 / x The first one is backed by information theory. It measures the optimal code length to associate with entry, in other words it measures the amount of information held by the entry. The second is a heuristic that defines a different behavior from the previous one: computed cost for frequent entries will be higher, and for rare entries it will be lower. In consequence, considering the criterion formerly described, frequent entries will be more easily grouped than previously. This second formula may be used when a more selective filter is needed: the final dictionary will contain very relevant entries. The function may be considered "entropic". Note that the definition of "entropic" given above may differ from the usual notion of entropic function used in information theory. Figure 1 shows a dictionary, at the beginning of the first iteration of the process; this dictionary is used as a starting point for an embodiment of the keyword definition process. The dictionary is built from the entries of the database. It contains all lexical elements W i of the database. For the sake of simplicity, one will consider in the rest of this example that lexical elements are words; it should be born in mind that lemmas or other lexical elements could be used for populating the dictionary. As explained above, in addition to words, the dictionary contains for each word W i a number NW i representative of its number of occurrences in the database. Figure 1 thus shows a limited number of words of the dictionary, together with their associated number. From the point of view of data processing, the dictionary of figure 1 may be implemented as a hash table, while the program for populating the dictionary may be a simple run over all documents. Apart from the dictionary, the other starting point for the process is a collection of sequences S j of words, which appear in the database. A "sequence" is a set of at least two words that appear in at least one text of the database; in the example of figure 2, each sequence is ordered, the order of the words being the order in which they appear in the text. Figure 2 shows part of this collection; in this collection, one uses lemmas and not words. Only some of the sequences are represented in figure 2. As shown on this figure, some sequences have a meaning, e.g. the sequence "press relea", which is the sequence of lemmas for "press release" or the sequence "web site". Other sequences are meaningless; this is the case for the sequence "add search", which is simply formed of two words adjacent in one given text of the database. Each sequence S j in this collection is associated with a number NS j representative of its frequency in the database. The dictionary and the collection of sequences may be formed as discussed now. For populating the dictionary, one simple way is simply to scan all texts of the database and add all the words in the dictionary. Each time a new word is added to the dictionary, its associated number is set to one. When a word already contained in the dictionary is met in the scan of the database entries, the number associated with this word is increased by one. When the database is scanned, the dictionary is populated with the words of the database, associated with their number of occurrences in the database. The method disclosed in this paragraph is the simplest one that may be contemplated for populating the dictionary; other methods or heuristics may be used for populating the dictionary. For populating the collection of sequences, the method discussed in the previous paragraph may be used; however, instead of populating the dictionary with words, the collection is populated with sequences of words. This may be carried out by first adding into the collection all sequences formed of one word, in a first scan of the database - this being tantamount to building the dictionary. In a second scan of the database, one may add into the collection all sequences formed of two words. One may then in each successive scan add new sequences of words to the database, up to sequences of a given size L max . One thus obtains a collection of sequences of words, having a length between one and L max ; these sequences appear in the database, and are associated with a number representative of their frequency in the database; as this is the case for the occurrences in the dictionary. this number may be normalised. Again, this method for populating the collection of sequences is possible to carry out in finite time - since the database is finite and L max is a finite number. Other methods may be used for populating the collection of sequences. Starting from the dictionary and the collection of sequences, the process adds to the dictionary new entries originating from the collection of sequences. Figure 3 to 5 show a flowchart for this process. The first step 6 consists in procuring the dictionary and the collection of sequences used as a starting point. This step may be carried out as discussed above. The first part of the process - from step 8 to step 24, depicted in figure 3 - segments all sequences of the collection of sequences into elements of the dictionary. For a given sequence, there may be several ways to segment the sequence into elements of the dictionary; each of these ways is referred to as a "cut-out" of the sequence, or as a "segmented sequence". One of these cut-outs is selected for the following steps of the process. In the step 8, a current sequence S j in the collection of sequences is considered. The sequence is then cut out into elements, each element being a word or a smaller sequence of words. Since the length of the sequence is at least two, there exists at least one possible cut-out of the sequence : a sequence of two words may be cut out into these two words. For instance, the sequence of three words "the French republic" could be cut out in the following ways: the / French republic; the French / republic; the / French / republic. This sequence of three words may thus be cut-out in three different ways - this taking into account the order of words in the sequence, as proposed above for this example. In the example, the first cut-out includes a first element of one word and a second element of two words. More generally, a sequence of L max words may be cut-out into a finite number of ways. Step 8 provides, for the sequence currently considered, a series of cut-outs. In the next step 10, the first cut-out obtained in step 8 is considered. This cut-out is formed of a number of elements of the dictionary or of combinations of such elements. In step 12, the dictionary is searched for trying to locate each of the elements and combinations forming the cut-out. In step 14, it is determined whether the cut-out currently considered is formed of elements of the dictionary. For instance, in the example "the French republic" considered above, the first and second cut-outs are not necessarily formed of elements of the dictionary : indeed, "French republic" or "the French" do not necessarily appear in the dictionary at this stage of the process. If this is not the case, the process proceeds to step 16; else, if all elements of the cut-out are present in the dictionary, the process proceeds to step 18. In step 16, it is determined whether all cut-outs of the sequence currently considered have been analysed. If this is the case, the process proceeds to step 22; else, the process proceeds to step 20. In step 20, the next cut-out is considered, and the process proceeds again to step 12. In step 18, all elements of the cut-out currently considered are present in the dictionary. As discussed above, each entry of the dictionary is associated to a number NW i representative of the number of occurrences of the element in the database; this number may therefore be used for computing a cost of the cut-out. The cost of the cut-out or segmented sequence may thus be computed, e.g. based on the cost associated in the dictionary to each element of the cut-out. In the simplest embodiment, the cost of the cut-out is computed as the sum of the costs of its elements. Other embodiments are possible for computing the cost of a cut-out : one may for instance take into account the number of elements of the dictionary forming the cut-out; this could be done by adding to the sum an amount representative of the number of elements. One may also consider that the cost of a cut-out is only representative of the number of elements; this solution is tantamount to selecting the cut-out formed of the smallest number of elements. One may also add a fixed amount, this fixed amount being a function of the number of elements. For instance, adding a fixed amount when the number of elements is higher than three makes it possible to strongly favour cut-outs having two or three elements. Step 18 thus provides for the cut-out currently considered, a cost based on the number associated to the elements of the cut-out in the dictionary. The process then proceeds to step 16, for the analysis for other cut-outs. The process loops through steps 12, 14, 18, 16 and 20; it computes costs for all cut-outs obtained for the current sequence - provided the elements of the cut-outs appear in the dictionary. A cost may be computed for at least one cut-out : one of the cut-outs is formed of all the words of the sequence; these words are present in the dictionary, so that a cost may be computed for this cut-out. In step 22, for the current sequence, the process selects the cut-out having the least cost. Since the cost of at least one cut-out may be computed, step 22 provides one cut-out for the current sequence. This cut-out is actually a representation of the sequence in the dictionary : in other words, the cut-out is one way of forming the sequence by using elements of the dictionary. In the example disclosed above, one of the possible cut-outs is selected; one could also skip this step, and simply take the first identified cut-out for a sequence. In the next step 24, it is determined whether the process of determining a cut-out with the lowest cost was carried out for each sequence of the collection of sequence. If this is the case, the process proceeds to step 26. Else, if there is at least one sequence left, the process proceeds to step 28. In step 28, the next sequence is considered; the process then goes to step 8. When the process proceeds to step 26, a cut-out having the lowest cost is associated with each sequence of the collection of sequence; thus, each sequence of the original collection of sequences is segmented into elements of the dictionary; one may optionally select one of several ways to segment a given sequence. The first time the process proceeds to step 26, the sequences are formed of the words originally populated into the dictionary in step 6; at a later stage, the cut-outs may be comprised of other entries previously added to the dictionary. In the second part of the process, from steps 26 to 40, figure 4, based on the collection of cut-outs or segmented sequences obtained in the first part, one considers all possible concatenations C k of two (or more) adjacent elements in the collection of cut-outs. A given concatenation may appear in one cut-out or in more than one; for each concatenation, there is computed a number NC k representative of its frequency in the database [gmd l] . This may be carried out by populating a table of concatenations, as follows. In step 26, the first sequence S j is considered. The cut-out obtained in the first part of the process for this sequence is formed of at least two elements; in step 28, one computes all possible concatenations of two of these elements; the first of these concatenations is then considered. In the next step 30, the table of concatenation is searched for the concatenation C k currently considered; if this concatenation is not in the table, the process proceeds to step 32; else, it proceeds to step 34. At the time the first concatenation of the first sequence is considered, the table is of course empty. In step 32, the currently considered concatenation C k is added to the table; at the same time, the number of occurrences NC k is set to the number of occurrences NS j associated to the sequence S j where the concatenation was found. The process proceeds to step 36. In step 34, the concatenation C k currently considered is already in the table of concatenations. The number NC k of occurrences for this concatenation in the table is then increased by the number of occurrences NS j associated to the current sequence S,. The process then proceeds to step 36. In step 36, it is determined whether there remains a concatenation for the sequence currently considered. If this is the case, the process proceeds to step 38, else it proceeds to step 40. In step 38, the following concatenation is considered; the process then proceeds to step 30. In step 40, it is determined whether the process of determining concatenations and populating the table of concatenations was carried out for each sequence of the collection of sequence. If this is the case, the process proceeds to step 44. Else, if there is at least one sequence left, the process proceeds to step 42. In step 42, the next sequence is considered; the process then goes to step 28. Thus, when the process proceeds to step 44, there is provided a table of concatenations, containing all concatenations of two entries of the dictionary found in the cut-outs of the sequence. Each concatenation is associated with the number of its occurrences in the database : indeed, the computation carried out in steps 32 and 34 amount to adding the numbers of occurrences in the database of the sequence in which the concatenation may be found: The first and second parts of the process therefore provide concatenations of elements of the dictionary, with a number representative of their frequency in the database. The concatenations are selected among segmented sequences, possibly with a selection of the segmentation carried out for a given sequence : thus, the concatenations are likely to be more meaningful than concatenations randomly selected from the database. In the third part of the process, from step 44 to step 56, figure 5, it is determined whether the concatenations obtained so far should be added to the dictionary. For a given concatenation, this is carried out by computing the change to the total cost of the dictionary, if the concatenation were to be added to the dictionary. For a given concatenation, this computation is based on the number of occurrences NC k associated to each concatenation and on the number of occurrences associated in the dictionary to the entries forming the concatenation in the dictionary This is tantamount to determining whether coding the database texts with a dictionary containing the concatenation provides a code shorter or more compressed than the code of the database texts with the dictionary not containing the concatenation. The invention is thus based on the consideration that applying what is generally understood to be a compression scheme to a database of texts isolates keywords, that is words having a meaning in the database. Thus, in step 44, the first concatenation C k is considered; assume that this concatenation is formed of m elements of the dictionary, W k1 to W km , with m ≤ L max ; in step 46, a second formula g is applied to the number NC k representative of the frequency of the concatenation in the database and to the numbers NW k1 to NW km associated to these elements of the dictionary forming the concatenation. The second formula is representative of the variation of cost for the whole dictionary, if the concatenation were to be added to the dictionary. The second formula will thus be representative of the easiness for adding new entries into the dictionary. As discussed below, the second formula may only be an approximation of the exact variation, or a prediction of this variation, so as to make computation tractable (computationally feasible) and the invention implementable. The second formula needs to be consistent with the first formula, which gives the cost of single elements; it may be derived from this first formula, under specific approximations. The approximations may be more or less accurate, depending on efficiency-driven algorithmic choices. The purpose is in all cases that the dictionary still complies with the two criteria given above, when new entries added. In a first example, one may choose to make no approximation for the second formula: the exact variation of cost of the dictionary is then computed. The simplest method therefor comprises the following steps: computing and recording the cost of the whole dictionary, defined as the sum of all costs of its entries; adding the concatenation to the dictionary, computing the cost of the elements of the dictionary completed with the concatenation, as discussed in reference to step 6 computing the cost of the dictionary completed with the concatenation; subtracting from the cost of the completed dictionary the recorded cost of the original dictionary. One may then revert to the original state of the dictionary - by removing the concatenation - and run once more the computation of costs. It should be obvious that such a computation is untractable in most practical instances. Second, one may want to use some approximation for computing the expected variation more quickly. For example, one may consider that the total number of entries NW is roughly constant, because there are a lot of entries and choosing or not to add one does not change it in a significant way. This makes it possible to compute the expected variation of cost as : the added cost for the concatenation; the reduction of cost for the elements of the concatenation which already appeared in the dictionary. Indeed, adding a concatenation C k to the dictionary will reduce the number of occurrences of the elements W k1 to W kn forming this concatenation, and will therefore impact the numbers NW k1 to NW kn . For instance, under the assumption that the chosen entropic formula is f(x) = -ln(x / NW), and under the assumption that the concatenation is formed of two elements of the dictionary, the approximated variation would originate from the elements of the considered concatenation and the concatenation itself. Then the corresponding formula, called g could be : g(x) = - NC k . ln(NC k / NW) - (NW k1 - NC k + 1) . ln((NW k1 - NC k + 1) / NW) - (NW k2 - NC k + 1) . ln((NW k2 - NC k + 1) / NW) - (- NW k1 . ln(NW k1 / NW) - NW k2 . ln(NW k2 / NW)) where NC k is the number of occurrences computed in step 22; NW is the number of entries in the dictionary; W k1 and W k2 are the elements of the dictionary forming the concatenation, NW k1 and NW k2 being the numbers associated to these elements [GMD2] To understand the formulation of the function "g", it should be noted that the contribution to the total cost variation can be computed for each element of the dictionary. Under the assumption that NW is roughly constant, this variation is null except for W k1 and W k2 because NW k will change for these elements only. Before the addition, the contribution of W k1 is (- NW k1 .ln(NW k1 /NW)) : its cost is (-ln(NW k1 /NW)) and it is used NW k1 times. This is true for W k2 too. After the addition of C k (W k1. W k2 ) to the dictionary, each time C k is used in a cut-out, W k1 and W k2 are no more used, so their number of occurrence are decreased by C k . Finally, W k1 and W k2 are used once in the dictionary, in the representation of C k , so their number of occurrence are increased by one. This gives the final cost contribution for W k1 and W k2 : - (NW k1 -NC k +1).ln((NW k1 -NC k +1) / NW) - (NW k2 -NC k +1).ln((NW k2 -NC k +1) / NW). Finally, C k contribution is simply - NC k . ln(NC k / NW). Such an expression may be computed quickly, with only two lookups in the dictionary to find NW k1 and NW k2 . This formula was written with a specific instance of f among the possible formulas, and for a concatenation formed of two elements. A similar approximated formula may be computed for other instances. Step 46 thus provides an expected variation of the total cost of the dictionary - the sum of the costs f(NW 1 ) for all elements of the dictionary - in case the current concatenation were added to the dictionary. In step 48, this expected variation is compared to a predetermined limit. This limit is representative of the easiness for adding new entries into the dictionary, and may be adapted according the circumstances. In the simplest embodiment, the limit is 0, and a concatenation is added if its addition decreases the cost of the dictionary; other embodiments are possible, such as the one discussed below where the expected variation is computed for all concatenations and where the concatenation causing the higher variation (in absolute value) are added to the dictionary. If the variation is lower than the limit, the process proceeds to step 50; else it goes to step 52. When the process reaches step 50, it is ascertained that the concatenation should be added to the dictionary; the process then computes a number to be associated to this new entry of the dictionary; one may simply use therefore the number NC k computed earlier, and the formula f.. At this step, one will also compute again the number associated to the elements forming the concatenation that has just been added to the dictionary; indeed, as discussed above, adding a concatenation to the dictionary will impact the number of occurrences of the elements of the concatenation. In step 52, it appears that the concatenation currently considered need not be added to the dictionary. It is therefore determined whether there is still a concatenation to be considered. If this is the case, the process proceed to step 54, else, it passes to step 56. In step 54, the next concatenation is considered; the process then passes to step 46. In step 56, all concatenations have been considered, and the third part of the process is ended - at least for this iteration. It is then determined whether another iteration should be carried out. If this is not the case, the process is ended at step 58. If this is the case, the process proceeds back to step 8, where the first sequence is again considered. Since each new entry into the dictionary is associated with a number of occurrences, the process may be iterated based on the new dictionary. Each iteration of the process results in a number of new entries being added into the dictionary. In the first iteration, the dictionary is originally a dictionary of words, and new entries are formed of two words. However, as from the second iteration, new entries of three or four words may appear in the dictionary. Each iteration will add entries in the dictionary that may be as long as the sequences. The number of iterations may vary; one may use only one iteration - that is not repeat the three parts described above. One may select a fixed number of iterations, for instance the number of iterations exemplified below. One may also decide to stop iterating in view of the number of entries added in the dictionary in the last iteration; other schemes are also possible, for instance the process may stop iterating once the dictionary contains a given number of words, or when all entries added to the dictionary in the previous iteration are associated with a number of occurrences lower than a predetermined figure. The process of figure 3 may be implemented by programming in C under some Unix system. An example of the process of figure 3 is now given. The database of text comprises 4.10 5 texts in the English languages. Based on this database, a dictionary of 4.10 5 entries is built; the normalised number of occurrences varies between 4 and 10 4 . The maximum sequence length L max is selected to 6; the collection of sequences built as discussed above contains 1.10 6 sequences. The process of claim 3 is carried out; in step 18, the formula used for computing the cost of cut-out elements is f(x) = -In (x / NW), and g is the previously defined approximation example. In the first iteration, 15.10 4 entries of two words are added to the dictionary. The process is iterated 5 times. In the second iteration, 5.10 4 entries of two words, 9 .10 4 entries of three words and 2.10 4 entries of four words are added to the dictionary. In the third iteration 2.10 4 entries of two words are added to the dictionary, 6.10 4 entries of three words , 4.10 4 entries of four words, 2.10 4 entries of five words, and 10 3 entries of six words. In the fourth iteration 1.10 4 entries of two words are added to the dictionary, 2.10 4 entries of three words , 4.10 4 entries of four words, 3.10 4 entries of five words, and 2.10 4 entries of six words. In the fifth and last iteration 1.10 3 entries of two words are added to the dictionary, 2.10 3 entries of three words, 2.10 4 entries of four words, 4.10 4 entries of five words, and 4.10 4 entries of six words. The method provides a highly relevant keyword set: it selects only a small set among the entire candidate sequences, typically 10%. It provides a filter, not only a scoring function, as for collocation-based methods: collocation-based methods only associate scores to sequences, then sequences are sorted by these scores, and finally a fraction of the top ones may be selected, for example the first half. With the present method, there is no need to decide a priori which score threshold is relevant to split between bad and good keywords. The dictionary obtained at the end of this process may be used as a dictionary of keywords for indexing the texts of the database. One may also use as keywords only part of the dictionary, e. g. entries added to the dictionary during the process; and/or original entries having a number of occurrence over a predetermined value. The process discussed above may be adapted. In one embodiment there is defined a "display" form for the Keywords. One of the examples given above was "Eric's car" and the "car of Eric"; it was explained that these two expressions could provide the same keyword, assuming a given set of rules was selected; the keyword could be formed of the lemmas of the two words (if any), or may be hardly understandable to the user. In such a case, one may define a display form : the display form of a keyword used for displaying the keyword to the user, so that he is faced with an easy to understand expression. The display form of a keyword may for instance be selected as the expression or textual form that is the most frequent among all expressions or textual forms that are abstracted into the same keyword. In the example discussed in reference to figures 3-5, one uses a database of texts as the basis for the dictionary; in addition or in alternative to such text database, one may use a log of requests inputted by users of a system. One could also start from a database of sequences of words of limited length, extracted from a database of texts. This would provide a set of keywords representative of the interests of the users of a system. One example is the following : for a given keyword, frequency in the database of text is compared to the frequency in the log of requests. According to the results of the comparison, the keywords are ranked before being displayed to the user. This helps taking into account the requests formed by the users, instead of simply considering the database of texts. One could also start from a database of sequences of words of limited length, extracted from texts, e.g. as discussed above in relation to the building of sequences. In this case, the collection of sequence is identical to the database of texts. In the flowchart of figures 3 to 5 and in the example given immediately above, the simplest rules were considered; specifically, entries in the dictionary are formed of words; sequences are formed of a certain number of words, in the order in which they are found in the texts of the database; a concatenation is formed of adjacent words of a sequence. These rules may change. First, as briefly mentioned above, entries in the dictionary may comprise lemmas instead of words; more generally, any lexical elements of the database may be considered. Thus, the process is not limited to words or lemmas, but applies to any type of lexical element selected from the database. One could for instance consider as lexical entries the set formed of a word or lemma together with an attribute of this word or lemma in the sentence where it is found. This would make it possible to distinguish between the different possible uses of the same lemma as noun, verb, adverb, etc. Such attributes may be obtained thank to methods known per se, such as morpho-syntactic taggers. Second, the dictionary in the example given above is populated with all words present in the database; some of these words may be ignored. This amounts to filtering the lexical elements at the time the dictionary is populated. For instance, one may decide to ignore all words which do not have a specific meaning, such as articles; to ignore all words having a number of occurrences below / above a predetermined value this value being an absolute value or a relative value. One may also decide to use only part of the database for populating the dictionary, e.g. when a specific part of the database is considered representative of the complete database. This would notably lower the number of lexical elements and reduce the computation necessary for carrying out the process. This is tantamount to filtering or selecting lexical elements for use in the dictionary. Third, the sequence-forming rule may vary, and may be different from the example given in reference to figures 3-5; in this example, a "sequence" is formed of elements adjacent in a text of the database. For instance, in another embodiment, the order of words may be irrelevant : in this case a sequence is set of words which may be found in an entry of the database, in any order. This may notably be of interest if order of words (or lemmas) is not relevant in the language of the texts of the database. For instance, this would allow "Eric's car" and "the car of Eric" to be treated as the same sequence - assuming words such as articles are not considered. In this embodiment, the "sequence" does not correspond to the usual meaning of a sequence. As briefly discussed above, the number of lexical elements in a "sequence" may also vary. Fourth, the rule applied for forming sequences may be different from the one considered in the example of figure 3. In the simplest variation, the order of cut-outs may be irrelevant; in another variation, concatenations may be formed of cut-outs that are not necessarily adjacent; both variations may be combined It should also be clear that the different rules discussed above may vary independently of each other; for instance the choice of entries into the dictionary may be selected independently of the rule for sequence-forming. The currently preferred set of rules is the one discussed in reference to figures 3-5 : populate the dictionary with all words, build sequences out of adjacent words in the order they have in the texts, and form concatenation with adjacent words; The selection of rules makes it possible to fit the process to the linguistic rules of the language of the entries to the database; however, one may also select a set of rules and formulas - such as the one disclosed above in reference to figures 3 to 5 - that allows texts in different languages to be processed. The process is not limited to the description made above, and it may be adapted to the computational means used for carrying it out. Other ways of populating dictionaries and collection of databases may be used. In the example given above, NW i is simply the number of occurrences of the element W 1 ; this number proves to be simple to compute and record; one may also record the ratio of the number of occurrences of the element to the total number of occurrences, if this proves convenient for further computation of the cost. One could also store the cost itself in the dictionary even though this may prove less practical. One could also record the number of occurrence as well as the cost - both being representations of the same information; the fact that the function is strictly decreasing makes it bi-univocal for positive numbers. In the third part of the process, the concatenation may be added as new entries in the dictionary at the end of the process; this differs from the embodiment disclosed in figure 3, wherein concatenations are added one by one. The occurrences in the dictionary may be normalised or not. In the example of figure 3, each sequence is associated in the collection of sequences to a number representative of its frequency in the database; this makes it possible to compute the number of occurrences of a concatenation without having to search the database; if another means is provided for computing the number of occurrences or the frequency of a concatenation, then the computation of said number for each sequence may be dispensed with. In addition, the flowchart discussed above in reference to figures 3 and 4 could be amended. For instance, steps 28-36 of figure 4 could be carried out for one given sequence, after step 22 and before step 24. This simply means that the concatenations for a sequence are computed immediately after the cut-out having the lowest cost is identified. In the flowchart of figure 5, in step 50 one could simply store the concatenation; all concatenation, or part of them could then be added to the dictionary at a later stage. This proves advantageous inasmuch as it permits selecting some of the proposed new entries - e.g. the most relevant ones only. In addition, in the flowchart of figure 5, the second formula is an approximation; validity of this approximation is not checked in the flowchart of figure 5 - it being assumed that the approximation is close enough to the original entropic function, so that the global features of the dictionary are preserved (first and second conditions given above). It is also possible to ascertain ex post that these properties are preserved. One may for instance add new entries to the dictionary, and then compute again the costs for all the entries of the dictionary. This may prove advantageous if the second formula is a coarse approximation of the first formula; this may also prove advantageous if the number of iterations in the process is high. In both instances, the practical limits of the approximation may be reached Last, the process was discussed in its preferred embodiment to extracting keywords for searching the database. One may use the keywords for other purposes, e.g. abstracting documents, summarising documents, semantic indexing or natural language parsing.

Claims: A process for extracting keywords from a database of texts, comprising the steps of: a) providing (6) a dictionary of lexical elements W i of texts of the database, an element in the dictionary being associated to a number NW i representative of its frequency in said texts; b) providing (6) a collection of sequences S j of lexical elements of texts of the database; c) segmenting (8) each sequence into elements of the dictionary ; d) providing (28) a collection of concatenations C k of the elements of said segmented sequences; a concatenation in the collection being associated to a number NC k representative of its frequency in said database of texts; e) based on the number NC k associated to a concatenation C k of said collection of concatenation and on the numbers NW i associated in the dictionary to the elements forming said concatenation, computing (46) the variation of the sum of the costs of all elements of the dictionary if the concatenation were to be added to the dictionary, the cost of an element being computed as a decreasing and entropic function of the number associated to said element, and f) adding (50) said concatenation to the dictionary according to the results of said computation. The process of claim 1, further comprising g) repeating said steps c), d) and e). The process of claim 1 or 2, wherein the lexical elements comprise at least one of words, lemmas, sets formed of a word and an attribute thereof, sets formed of a lemma and an attribute thereof. The process of claim 1, 2 or 3, wherein the step of providing a dictionary comprises selecting lexical elements among all lexical elements of texts of the database, said step of selecting comprising the step of ignoring all lexical elements which do not have a specific meaning and all lexical elements having a number of occurrences below or above a predetermined value. The process of one of claims 1 to 4, wherein a sequence is an ordered set of lexical elements. The process of one of claims 1 to 5, wherein a sequence is a set of lexical elements adjacent in a text of the database. The process of one of claims 1 to 6, wherein the step of providing a collection of sequences comprises extracting from texts of the database sequences having a length lower than a predetermined length L max . The process of one of claims 1 to 7, wherein a concatenation is a set of elements of the dictionary adjacent in a segmented sequence. The process of one of claims 1 to 7, wherein a concatenation is an ordered set of elements of the dictionary present in a segmented sequence. The process of one of claims 1 to 9wherein the step of segmenting each sequence comprise: e1) determining (8) all possible segmentations of a sequence into elements of the dictionary, and e2) selecting (22) one of said possible segmentations. The process of claim 10, wherein the step of selecting comprises e21) computing ( 18) the sum of the costs associated to the elements of the dictionary for each possible segmentation; e22) selecting (22) the segmentation with the smallest sum. The process of one of claims 1 to 11, wherein a sequence in the collection is associated to a number NS j representative of its frequency in said texts and wherein the number NC k representative of the frequency of a concatenation C k is computed as the sum of the numbers NS j associated in said collection of sequences to sequences S j containing said concatenation C k . The process of one of claims 1 to 12, wherein the step of adding comprises: f1) computing (46, 48) the variation of the sum of the costs of all elements of the dictionary for a concatenation if the concatenation usere to be added to the dictionary; and f2) adding (50) a concatenation to the dictionary according to the results of said comparison. The process of one of claims 1 to 13, wherein a cost of a lexical element W i of the dictionary is computed as - ln(NW i /NW) with NW i the number of occurrences of the lexical element in the database and NW the number of elements in the dictionary. The process of claim 14, wherein the variation in step (e) is computed as g(x) = - NC k . ln(NC k / NW) - (NW k1 - NC k + 1). ln((NW k1 - NC k + 1) / NW) - (NW k2 - NC k + 1) . ln((NW k2 - NC k + 1) / NW) - ( - NW k1 . ln(NW k1 / NW) - NW k2 . ln(NW k2 / NW)) where NW k1 and NW k2 are the numbers associated to the elements W k1 and W k2 forming the concatenation C k . The process of one of claims 1 to 15, wherein the database of texts comprises a log of user's requests. The process of one of claims 1 to 16, further comprising the step of h) for an entry of the dictionary, providing a display form of the entry. The process of claim 17, wherein the display form for an entry of the dictionary is the most frequent of all expressions or textual forms of the database of texts that correspond to said entry.

Inventors: BOURDONCLE FRANCOIS, LAGUNAS FRANCOIS, BOURDONCLE, FRANCOIS, LAGUNAS, FRANCOIS, Bourdoncle, François, Lagunas, François
Applicants: EXENTIS
Application year: 2001
Main classification: G06F17
IPC codes: G06F17