METHOD AND SYSTEM FOR INFORMATION EXTRACTION

Abstract: A method and a system for extracting information from a natural language text corpus based on a natural language query are disclosed. In the method the natural language text corpus is analyzed with respect to surface structure of word tokens and surface syntactic roles of constituents, and the analyzed natural language text corpus is then indexed and stored. Furthermore, a natural language query is analyzed with respect to surface structure of word tokens and surface syntactic roles of constituents. Each portion of text comprising a string of work tokens that is equivalent to the natural language query with respect to lexical meaning of word tokens and surface syntactic roles of constituent is extracted from the indexed and stored analyzed natural language text corpus.

Description: METHOD AND SYSTEM FOR INFORMATION EXTRACTION Field of the Invention The present invention relates to the field of information retrieval from unrestricted text in different languages. Specifically, the present invention relates to a method, and a corresponding system, for extracting information from a natural language text corpus based on a natural language query. Background of the Invention The field of automatic retrieval of information from a natural language text corpus has in the past been focused on the retrieval of documents matching one or more key words given in a user query. As an example, most conventional search engines on the Internet use Boolean search for matches with the key words given by the user. Such key words are standardly considered to be indicative of topics and the task of standard information retrieval system has been seen as matching a user topic with document topics. Due to the immense size of the text corpus to be searched in information retrieval systems today, such as the entire text corpus available on the Internet, this type of search for information has become a very blunt tool for information retrieval . A search will most likely result in an unwieldy number of documents. Thus, it will take a lot of effort from the user to find the most relevant documents among the documents retrieved. Furthermore, due to the ambiguity of words and the way they are used in a text, many of the documents retrieved will be irrelevant. This will make it even more difficult for the user to find the most relevant documents. The performance of an information retrieval system is usually measured in terms of its recall and its precision. In information retrieval, the technical term recall has a standard definition as the ratio of the number of relevant documents retrieved for a given query over the total number of relevant documents for that query. Thus, recall measures the exhaustiveness of the search results. Furthermore, in information retrieval, the technical term precision has a standard definition as the ratio of the number of relevant documents retrieved for a given query over the total number of documents retrieved. Thus, precision measures the quality of the search results. Due to the many documents retrieved when using the above type of search methods, it has been realised within the art that there is a need to reduce the number of retrieved documents to the most relevant ones. In other words, as the number of documents in the text corpus increases, recall becomes less important and precision becomes more important. Thus, suppliers of systems for information retrieval have enhanced Boolean search by using relevance ranking metrics based on statistical methods. However, it is well known that thus highly ranked documents still comprise irrelevant documents. This is due to the fact that the matching is too coarse and does not take the context in which the matching words occur into account . In order to find the documents that are relevant to a user query, there is a need for the information retrieval system to understand in some way the meaning of a natural language query and of the natural language text corpus from which the information is to be extracted. There are proposals within the art how to create an information retrieval system that can find documents in a natural language text corpus that match a natural language query with respect to the semantic meaning of the query. Some of these proposals relate to systems that have been extended with specific world knowledge within a given domain. Such systems are based on an extensive database of world knowledge within a restricted domain. Creating and maintaining such databases of world knowledge is a well-known knowledge engineering bottleneck. Such databases scale poorly and a database within one domain can not be ported to another domain. Thus, it would not be feasible to extend such a system to a general application for finding information in unrestricted text, which could relate to any domain. Other proposals are based on underlying linguistic levels of semantic representation. In these proposals, instead of using verbatim matching of one or more key words, a semantic analysis of the natural language text corpus and the natural language query is performed and documents are returned that match the semantic content of the query. However, creating a deep level of semantic representation of very large natural language text corpora is a complex and demanding task. This is due to a multi-level representation of the text, different analysis tools for different levels and propagation of errors from one level to another. Because representations at different levels are interdependent, and for reasons given above, the resulting analyses will be fragile and error prone . Summary of the Invention An objective of the present invention is to provide an improved method, and a corresponding system, for extracting information from a natural language text corpus, that is not subject to the foregoing disadvantages of existing methods for these tasks. This object is achieved by a method and a system according to the accompanying claims . The present invention is based on the recognition that there is a close relationship 1) between the syntactic relations between constituents in clauses and sentences in a natural language text corpus and the semantic relations between them and 2) between word tokens within constituents and the structural and semantic relations between them. More specifically, the present invention is based on the recognition that these syntactico-semantic relationships can be used when matching a natural language query with a natural language text corpus to find text portions in the natural language text corpus that have the same meaning as the natural language query. According to one aspect of the invention a method for extracting information from a natural language text corpus based on a natural language query is provided. In the method, the natural language text corpus is analyzed with respect to surface structure of word tokens and surface syntactic roles of constituents, and the analyzed natural language text corpus is then indexed and stored. Furthermore a natural language query is analyzed with respect to surface structure of word tokens and surface syntactic roles of constituents. Each portion of text comprising a string of word tokens that is equivalent to said natural language query in terms of lexical meaning of word tokens and surface syntactic roles of constituents is extracted from the indexed and stored analyzed natural language text corpus . In "surface structure of word tokens" and "surface syntactic roles of constituents" the term "surface" indicates that the word tokens and constituents are considered as they appear, and in the order they appear, in the text, and the term "constituents" refers to the basic parts of the text, such as word tokens, phrases etc. An important property of these features is that they can be found using a single-level analysis, e.g. using shallow parsing. For example the constituents always consist of word tokens that are contiguous in the text. By analyzing the natural language query with respect to surface structure of word tokens and surface syntactic roles of constituents it is possible to extract not only verbatim matches of the analyzed natural language query but also strings of word tokens that have equivalent lexical meaning of word tokens and equivalent surface syntactic roles of constituents. These strings of word tokens are alternative ways of expressing the same meaning as the original natural language query. The extraction utilizes the fact that the surface syntactic roles of the constituents together with the lexical meaning of the word tokens are closely connected to the meaning of a natural language text unit, such as a sentence, phrase or clause. Since not only verbatim matches of the natural language query, but also all strings of word tokens that are equivalent to the natural language query with respect to lexical meaning of word tokens and surface syntactic roles of constituents are extracted, the number of extracted strings of word tokens is increased relative to what it would be if the matching were verbatim. However, due to the fact that the lexical meaning of word tokens and the surface syntactic roles of constituents in the extracted strings are equal to the natural language query, it is ensured that the extracted strings of word tokens in the natural text corpus have the same meaning as the natural language query. One advantage of the invention is that it uses a single-level analysis of the natural language text corpus and the natural language query, as opposed to known methods that use multi-level analyses, which makes the invention faster and more reliable. At the same time, its precision is high and the amount of retrieved information is manageable. The analysis of the natural text corpus can be done in advance and be stored in an index. This limits the analysis to be done in real time to the analysis of the natural language query. Thus, the method according to the invention is significantly faster than the known methods using linguistic analysis. In an embodiment of the invention the surface syntactic roles of constituents are head and modifier roles, and grammatical relations. By maintaining these roles the extracted string of word tokens will express the same meaning as the natural language query. In another embodiment of the invention, a string of word tokens in said indexed and stored analyzed natural language text corpus is equivalent to the analyzed natural language query in terms of lexical meaning of word tokens and surface syntactic roles of constituents, if its head words of phrases bearing the grammatical relations of subject, object, and lexical main verb are lexically equivalent to the head words of phrases bearing the grammatical relations of subject, object, and the lexical main verb respectively in the analyzed natural language query. In this way the extraction becomes straightforward and thus, the method becomes faster. In a preferred embodiment, the analysis of the natural language text corpus and the natural language query comprises the steps of determining the word tokens of the corpus, a morpho-syntactic description for each word token, locating phrases, determining a phrase type for each phrase, and locating clauses. Furthermore, for each word token of said natural language text corpus, a unique word token location identifier is provided and information regarding the location of each word token, each phrase of each type, and each clause in said natural language text corpus is stored, based on said unique word token location identifiers. The information regarding the location of a word token is preferably a word type associated with the word token and its unique word token location identifier logically linked to the stored associated word type. In this way each word type is only stored once instead of storing each word token of the natural language text corpus. This is especially advantageous in cases where the natural language text corpus is large. Furthermore, the information regarding the location of a phrase is preferably the phrase type of the phrase and a unique phrase location identifier logically linked to the stored phrase type, wherein the ω KJ KJ H tπ o LΠ o in o LΠ to the way the natural language text corpus has been indexed and stored. According to one embodiment of the invention one or more surface variants of the analyzed natural language query are created. These surface variants are equivalent to the natural language query with respect to 1) lexical meaning of word tokens and 2) surface syntactic roles of constituents. The surface variants are then compared with the indexed and stored analyzed natural language text corpus, and each portion of text comprising a string of word tokens that matches the one of said surface variants or said natural language query is extracted from the indexed and stored analyzed natural language text corpus. By analyzing the natural language query with respect to surface structure of word tokens and surface syntactic roles of constituents it is possible to create surface variants of the analyzed natural language query that maintain the lexical meaning of word tokens and the surface syntactic roles of constituents. These variants together with the natural language query form a set of alternative ways of expressing the same meaning as the original natural language query. The creation of variants utilizes the fact that the surface syntactic roles of the constituents together with the lexical meaning of the word tokens are closely connected to the meaning of a natural language text unit, such as a sentence, phrase or clause. The variants that have been created are then compared with an indexed and stored analyzed text corpus, where the natural language text corpus has been analyzed in the same manner as the natural language query. Since not only the natural language query, but all variants as well are compared, the number of matches is increased relative to what it would be if the matching were verbatim. However, due to the fact that the lexical meaning of word tokens and the surface syntactic roles of constituents are preserved in the variants of the natural language query, it is ensured that matches in the natural text corpus have the same meaning as the natural language query. In another embodiment of the invention, a string of word tokens in said indexed and stored analyzed natural language text corpus matches one of the surface variants, or the analyzed natural language query, if it comprises the head words of phrases bearing the grammatical relations of subject, object, and the lexical main verb in said one of the surface variants or the analyzed natural language query in the same linear order as in said one of the surface variants or the analyzed natural language query. In this way the matching becomes straightforward and thus, the method becomes faster. It is to be noted that the number of variants created may be reduced when at the same time the matching is relaxed. However, there is always a trade-off between the time for the analysis that needs to be done during matching and the time for matching a number of variants. According to a second aspect of the invention a system for extracting information from a natural language text corpus based on a natural language query is provided. The system comprises a text analysis unit for analyzing a natural language text corpus and a natural language query with respect to surface structure of word tokens and surface syntactic roles of constituents. To the analysis unit storage means for storing the analyzed natural language text corpus are operatively connected to said text analysis unit . Furthermore the system comprises an indexer, operatively connected to the storage means, for indexing the analyzed natural language text corpus, and an index, operatively connected to the indexer, for storing said indexed analyzed natural language text corpus. Finally, the system comprises a result manager, operatively connected to the index, for extracting, from the indexed and stored analyzed natural language text corpus, each portion of text comprising a string of word tokens that is equivalent to the analyzed natural language query with respect to lexical meaning of word tokens and surface syntactic roles of constituents. In another embodiment the system further comprises a query manager, operatively connected to the text analysis unit, comprising means for creating surface variants of the natural language query, said surface variants being equivalent to said natural language query with respect to lexical meaning of word tokens and surface syntactic roles of constituents, and means for comparing said surface variants and the analyzed natural language query with the indexed analyzed natural language text corpus in said index. In this embodiment the result manager is arranged to extract, from the indexed and stored analyzed natural language text corpus, each portion of text that comprises a string of word tokens that matches any one of the surface variants or the analyzed natural language query. Thus, by recognizing the fact that there is more information regarding the meaning of a natural language text inherent in the surface structural and semantic relations between constituents and word tokens of the natural language text, and by optionally using an expansion of a natural language query into surface variants that maintain the lexical meaning of word tokens and surface syntactic roles of constituents of the original natural language query, an improved method for information extraction can be achieved that is fast, reliable and that has a high precision. Brief Description of the drawings In the following, the present invention is illustrated by way of example and not limitation with reference to the accompanying drawings, in which: figure 1 is a flowchart of one embodiment of a method according to the invention; figure 2 is a flowchart of another embodiment of a method according to the invention; figure 3 is an illustration of an example of a natural language query and its constituents; figure 4A-C are illustrations of the natural language query of figure 3 and surface variants thereof; figure 5 is a schematic diagram of one embodiment of a system according to the invention; and figure 6 is a schematic diagram of another embodiment of a system according to the invention; and. Detailed Description of the Invention Figure 1 is a flowchart of one embodiment of a method according to the invention. In the method information is extracted from a natural language text corpus based on a natural language query. One example of a natural language text corpus is a subset of the information found in web servers on the Internet . To be able to use linguistic properties of the text corpus in order to match a natural language text query against the natural text corpus, the natural language text corpus is analyzed, in step 102, with respect to surface structure of the word tokens and the surface syntactic roles of the constituents of the natural language text corpus. This is done in order to determine a morpho-syntactic description for each word token, locate phrases, determine a phrase type for each of the phrases, and locate clauses. The morpho-syntactic description comprises a part-of-speech and an inflectional form, and the phrase types comprise subject noun phrase, object noun phrase, other noun phrases and prepositional phrases. A clause can be defined as a unit of information that roughly corresponds to a simple proposition, or fact. An example of an analyzed clause will be described below with reference to figure 2. After the natural language text corpus has been analyzed it is indexed and stored in step 104 of figure 1. In this step the spaces between each word token are numbered consecutively, whereby the location of each word ω U M t μ> M LΠ o LΠ o in o LΠ μ- rt tr H Φ 03 TJ φ Ω rt rt 0 Φ X μ- Ω 0 3 Φ 0 0 μ- ø LQ 0 Mi s; 0 ii Pi rt 0 ? Φ ø 03 0 0 Pi surface syntactic roles of constituents are extracted from the natural language text corpus. A surface syntactic role is for example, head, modifier, subject noun phrase, object noun phrase etc. An example of a number of variants of a query will be described below with reference to figure 4A-C. In the extraction a word token in a the natural language query is compared with the stored word types of the natural language text corpus and the word token location identifiers of the word tokens of the same word type or a word type with a lexical meaning equivalent to the word token in the natural language question, are identified. The identified word token location identifiers are then used to determine the word tokens in the natural language text corpus that are included in a phrase of the same type as the word token in the surface variant. This is done by searching the phrase location identifiers associated with the phrase type that the word token in the natural language query is included in and determining which of the identified word token location identifiers are included in one of these phrase location identifiers. This is done for each word token in the natural language query, and in addition to determining whether the word token is included in the same phrase type, it is also determined whether the word tokens are included in the same clause in the natural language text corpus. This can be done easily by determining if the identified word token location identifiers are included in the same clause location identifier. Thus, if a set of word tokens in the natural language text corpus are found in a clause in the natural language text corpus, where each word token of the set of word tokens has the same lexical meaning and the same syntactic role as a respective one of the word tokens of the analyzed natural language query, a portion of text comprising the set of word tokens is extracted in step 108 of figure 1. Preferably, all such sets of word tokens are extracted. ω t μ> μ> LΠ o <-π o cπ o Π rt Mi rt 0 .P tr Ω rt tr Ω 3 Ω rt TJ tr μ- ø- Hi ø Φ 0 ø- 0 φ O Φ 0 tr 0 Φ LQ Φ LQ Φ μ- Hj Φ < 02 0 ø Hj Φ Hi ø ø Hi ø Hj μ- Ω 02 0 ii rt Ω ii 0 0 ^ LQ Φ lP ø Hj rt μ- Φ TJ μ- 0 Φ ø μ- CQ ø LQ μ- μ- ø 03 0 0 •rj 3 rt N ø TJ Φ tr rt LQ TJ Hi ø μ- TJ t ø Φ •xj 0 Hj rt Φ ø 0 0 CQ 0 0 •> Hi Pi 0 03 0 *< tr Pi Φ 0 0 μ- ø Hj ø Hi > 0, Φ ø Mi Pi 0 O μ- s > 03 rt 0 Φ μ- 03 rt Φ 0 Ml H- 1 CQ μ- 0 13 * 0 0 CQ CQ 0 03 ■ t 0 02 ^ 0 rt Ω φ 0 Ω 0 Ω • 0 Ω rt *" ø - 0 tr Hi Φ Ω 3 ø- Hj Φ 0 Φ 0 3 3 0 Φ M Pi Hi X μ- 0 03 LQ rt 0 rt 0 rt - S3 rt ø rt 0 tr Hi 0 - 02 tr φ rt μ- rt s- 0 0 0 φ Hi ø μ- Φ 0 0 rt Φ ø 03 0 Hi LQ cr 0 P. 3 rt P tr tr X Hi rt Hj Φ Φ rt φ 3 Φ Φ rt Φ Φ Pi Pi 02 rt tr 0 Hj ø ø LQ ø rt TJ -P ø tr Φ φ 02 tr ø 0 rt 0 0 μ- φ Ω P. ø Ω Φ φ Hi Hj μ> 0 0 Φ P, Φ 0 02 0 Φ 0 Φ LQ H ^ rt M Φ (Q 0 rt ø 0 Q SD o Φ 0 ^ TJ X 0 02 0 rt 02 0 P. 0 LQ 0 0 Hi O rt μ- rt tr rt Ml Φ Hj μ- 0 ø ø Hi M J μ- tr Φ μ- 03 Hi 0 N H μ- Hi rt ø 0 rt 0 rt Ω 0 ^ 0 φ H ø φ μ- Ω H- 1 0 <. Φ ø 0 Hi TJ Pi Hi ■ > 0 rt Φ Φ Φ -P Φ Hi Hi S Φ μ- 0 0 Ω ø Φ 0 0 0 ø H 0 μ- Pi LQ 0 0 02 Pi rt rt 0 μ- rt Φ Ω rt H3 0 01 LQ 3 <! Φ ø- ø - Hi ø 0 TJ 0 TJ Ω μ- tr ø μ- TJ Ω μ- Φ Hj 0 ø Ml 0 0 0 μ- 0 0 03 Hj Ω 03 Mi LQ Hj Hi 0 LQ φ 0 ■ <: Φ 0 0 φ Φ rt rt 02 0 tr ø ø Pi 0 02 Hj μ- • Ω Pi Φ μ- rt Φ rt Φ rt TJ P. 03 Φ rf X 0 μ- T Hi TJ 0 ø φ μ- rt Φ rt ø rt 0 Ω 0 Ω Ω Ω 0 P tr <! X μ- 03 ø Hj Pi 0 Hi Φ rt rt LQ 0 Φ 0 rt ø ø Φ rt Φ 0 rt μ- ø K Hi 0 ø μ- LQ 02 μ- Ω Ω rt rt Φ Φ μ- Ω 03 Φ Hi rt 0 Hi rt 0 ø 0 0 X 0 O rt 0 φ μ- 0 0 Hi 03 rt ø Hj φ LQ rr O φ rt O - 1 P. 0 Hj rt TJ TJ Hi Φ Hi 0 ø 0 tr Φ Φ Ω ø ø 0 X Hi o Φ Hi φ φ X LQ tr Ω μ- 03 to 0 rt rt Hi ø 03 μ- Hj rt 03 . μ» TJ - rt rt rt Ω φ rt Φ o Φ ø Φ Φ Φ o ø φ tr P. Pi Hj X O X Hi 0 0 O Φ rt Hi rt 0 rt Hi Mi compared with the stored word types of the natural language text corpus and the word token location identifiers of the word tokens of the same word type as the word token in the surface variant are identified. The identified word token location identifiers are then used to determine the word tokens in the natural language text corpus that are included in a phrase of the same type as the word token in the surface variant. This is done by searching the phrase location identifiers associated with the phrase type that the word token in the surface variant is included in, and determining which of the identified word token location identifiers are included in one of these phrase location identifiers. This comparison is done for each word token in the variant and in addition to determining whether the word token is included in the same phrase type, it is also determined whether the word tokens are included in the same clause. This can be done easily by determining if the word token location identifiers are included in the same clause location identifier. When all the surface variants and the natural language query has been compared in step 210, each portion of text comprising a string of word tokens that matches any one of the surface variants or the analyzed natural language query are extracted in step 212 of figure 2. A string of word tokens in the natural language text corpus matches a surface variant if it comprises the head words of phrases bearing the grammatical relations of subject, object, and lexical main verb in the surface variant in the same linear order as in the surface variant . After step 212, the extracted portions of text are organized in step 108, which is described with reference to figure 1. In the following an example of an analyzed natural language query will be given with reference to figure 3. In the examples a number of abbreviations will be used which are explained in the table below: In figure 3, an illustration of an example of a natural language query and its constituents and grammatical relations are shown. Note that this could just as well be a part of a natural language text corpus. The example query is "the enemy destroyed the city" . The query is in this case a single clause that has the two main constituents "the enemy" which is a subject noun phrase nps and "destroyed the city" which is a verb phrase vp. The constituent "the enemy" in turn consists of the two constituents "the" which is an article AT and "enemy" which is a singular noun NN. The constituent "destroyed the city" consists of the two constituents "destroyed" which is a verb in past tense VBD and "the city" which is an object noun phrase npo. The constituent "the city" in turn consists of the constituents "the" which is an article AT and "city" which is a singular noun NN. In figure 4A-C illustrations of the natural language query of figure 3 and two different surface variants thereof are given. The method for generating variants of a linguistic expression that constitutes a query is inspired by Zellig Harris' notion of transformation as defined in Harris, Z., Co-occurrence and transformation in linguistic structure, Language 33 (1957) , pp 283 - 340, with the important difference that the method of the present invention makes use of the notion of 'initial clause ' where Harris uses the traditional notion 'sentence'. For a description of 'initial clause', reference is made to the co-pending Swedish patent application 0002034-7, entitled "Method for segmentation of text" , incorporated herein by reference and assigned to the assignee hereof. Harris' 1957 paper defines a formal relation among sentences, by virtue of which one sentence structure may be called a transform of another sentence. This relation is based on comparing the individual co-occurrences of morphemes . By investigating the individual co-occurrences of morphemes in sentences, it is possible to characterize the distribution of classes of morphemes that are not easily defined in ordinary linguistic terms. Harris' transformations are defined based on two structures having the same set of individual co-occurrences of morphemes: "If two or more constructions which contain the same n classes (whatever else they may contain) occur with the same n-tuples of members of these classes in the same sentence environment, we say that the constructions are transforms of each other, and that each may be derived from any other of them by a particular transformation. " In the examples in figure 4A-4C illustrating a natural language query and transformations to surface variants thereof, the following notation for morpheme and word classes is used: N (noun) , V (verb) , v (tense and verb auxiliary class) , T (article) , P (preposition) , C (conjunction) , and D (adverb) . For example, the constructions N v V N (a sentence) in figure 4A and N's Ving N (a noun phrase) in figure 4B are satisfied by the same triplets N, V, N { enemy, destroy, ci ty) so that any choice of members which we find in the sentence, we also find in the noun phrase and vice versa: The enemy destroyed the ci ty, the enemy' s destroying the ci ty. Where the class members are identical in the two or more constructions, Harris calls the transformation reversible, and writes it as Ni v V N 2 r -> Ni's Ving N 2 (and the set of triples for the first = the set for the second) . The same subscript means the same member of the class : the second appearance of Ni indicates the same morpheme as the first Ni. This example illustrates a first generic transformation that is used when creating surface variants of a natural language query. The transformation has the property that it maintains the lexical meaning of word tokens and surface syntactic roles of constituents of the natural language query. Thus, if we have the natural language query of figure 4A the surface variant of figure 4B can be created using the transformation: In some cases, all the n-tuples which satisfy one construction (i.e. for which that construction actually occurs) also satisfy the other construction, but not vice versa. For example, every triple of N 2 , V, and Ν 2 in the N x vV N 2 'active' sentence in figure 4A can also be found, in reverse order, in the N 2 v be Verz by NI 'passive' sentence in figure 4C: The enemy destroyed the ci ty, The ci ty was destroyed by the enemy. This example illustrates a second generic transformation that is used when creating surface variants of a natural language query. The transformation also has the property that it maintains the lexical meaning of word tokens and surface syntactic roles of constituents of the natural language query. Thus, if we have the natural language query of figure 4A the surface variant of figure 4C can be created using the transformation: Ni v V N 2 ■ ) N 2 v be Ven by NI Note that some triplets only satisfy the second sequence and not the first: The wreck was seen by the seashore . ω ω t -.o μ> μ> LΠ o LΠ o LΠ o in two spaces it is located between in the natural language text corpus . The two numbers of the spaces between which a word token is located form a word token location identifier for this word token. Furthermore, a phrase is uniquely defined by its phrase type and the number of the space preceding the first word token of the phrase and the number of the space succeeding the last word token of the phrase. The number of the space preceding the first word token of a phrase and the number of the space succeeding the last word token of the phrase form a phrase location identifier for this phrase. Similarly, a clause, a sentence, a paragraph and a document location identifier, respectively, is defined as the number of the space preceding the its first word token and the number of the space succeeding its last word token. The word types, word token location identifiers, phrase types, phrase location identifiers, clause location identifiers, paragraph location identifiers, sentence location identifiers and document location identifiers are stored in the index that is operatively connected to the indexer. The logical structure of the index is shown in the table below: Where nps = subject noun phrase, npo = object noun phrase, npx = other noun phrase, pp = prepositional phrase, cl = clause, s = sentence, p = paragraph and doc = document . The logical structure of the index illustrated in the table is based on a hierarchy of text units that are related by inclusion. The purpose of the multi-layered structure of the index is that, in combination with the invention's shared location system for text units of different kinds, it supports a direct search technique that permits rapid access to those corpus text units that match the set of complex constraints imposed by a given query and its surface variants . In figure 5, the embodiment comprises the result manager 512, which is operatively connected to the index 508. The result manager 512 extracts from the natural language text corpus, portions of text that comprise a string of word tokens that is equivalent to the analyzed natural language query with respect to lexical meaning of word tokens and surface syntactic roles of constituents. By determining the word type of a word token in a natural language query the word token location identifiers associated with the determined word type can be identified in the index. Furthermore, since the phrase type the word token has been determined in the text analysis unit, it can be determined which of the identified word token location identifiers are included in a phrase of the same type as the word token in the natural language query. This is done by searching the phrase location identifiers associated with the phrase type that the word token in the natural language query is included in, and determining which of the identified word token location identifiers are included in one of these phrase location identifiers. This comparison is done for each word token in the natural language query and except for determining if the word token is included in the same phrase type, the index is used to determine if the word tokens are included in the same clause in the natural language text corpus. This can be done easily by determining if the identified word token location identifiers are included in the same clause location identifier. Thus, if a set of word tokens in the natural language text corpus are found in a clause in the natural language text corpus, where each word token of the set of word tokens has the same lexical meaning and the same syntactic role as a respective one of the word tokens of the analyzed natural language query, a portion of text comprising the set of word tokens is extracted by the result manager 512 of figure 5. Preferably, all such sets of word tokens are extracted. Finally, in figure 5, the portion of text to be extracted can be chosen as the string of word tokens itself, or the clause, the sentence, the paragraph or the document that the string of word tokens are included in. The extraction means use the index to find the proper clause, sentence, paragraph and document by consulting the respective location identifiers in the index. In figure 6, another embodiment of a system according to the invention is shown. In this embodiment a query manager 610 is operatively connected to the text analysis unit 502 and comprises means 620 for creating surface variants of a natural language query that has been analyzed in the text analysis unit 502. The created surface variants all have the property that the lexical meaning of its word tokens and the surface syntactic roles of its constituents are equivalent to the lexical meaning of the word tokens of the natural language query and the surface syntactic roles of the constituents of the natural language query, respectively. In other words, when a surface variant is created, each word token of the natural language query may be replaced with one or more word tokens that have the same lexical meaning and the word tokens may be rearranged as long as each constituent of a variant has an equivalent surface syntactic role as the corresponding one in the natural language query. A surface syntactic role is for example, head, modifier, subject noun phrase, object noun phrase etc. Furthermore, the query manager comprises comparing means 622 for comparing the surface variants created in the surface variant unit and the natural language query with analyzed natural language text corpus stored in the index. The comparing means 622 use the structure of the index in order to do the comparison. By determining the word type of a word token in a surface variant the word token location identifiers index associated with the determined word type can be identified in the index. Furthermore, since the phrase type the word token is in has been determined in the text analysis unit, it can be determined which of the identified word token location identifiers are included in a phrase of the same type as the word token in the surface variant. This is done by searching the phrase location identifiers associated with the phrase type the word token in the surface variant is included in and determining which of the identified word token location identifiers are included in one of these phrase location identifiers. This comparison is done for each word token in the variant and except for determining if the word token is included in the same phrase type, the index is used to determine if the word tokens are included in the same clause . Furthermore, in the embodiment of figure 6, the result manager 512, is adapted to extract each portion of text in the natural language text corpus that comprises a string of word tokens that matches any one of the surface variants or the natural language query. A string of word tokens in the natural language text corpus matches a O in

Claims: CLAIMS 1. A method for extracting information from a natural language text corpus based on a natural language query, comprising the steps of: analyzing said natural language text corpus with respect to surface structure of word tokens and surface syntactic roles of constituents; indexing and storing the analyzed natural language text corpus; analyzing a natural language query with respect to surface structure of word tokens and surface syntactic roles of constituents; and extracting from said indexed and stored analyzed natural language text corpus, each portion of text comprising a string of word tokens that is equivalent to said analyzed natural language query with respect to lexical meaning of word tokens and surface syntactic roles of constituents. 2. The method according to claim 1, wherein, in the step of extracting, said surface syntactic roles of constituents are head and modifier roles, and grammatical relations . 3. The method according to claim 1 or 2 , wherein, in the step of extracting, a string of word tokens in said indexed and stored analyzed natural language text corpus is equivalent to said analyzed natural language query with respect to lexical meaning of word tokens and surface syntactic roles of constituents if its head words of phrases bearing the grammatical relations of subject, object, and lexical main verb are lexically equivalents of the head words of phrases bearing the grammatical relations of subject, object, and lexical main verb in said analyzed natural language query. ιo ω t t μ> μ 1 in o in o in o in analyzed in the step of analyzing said natural language text corpus . 8. The method according to any one of claims 1-7, wherein the step of analyzing a natural language text corpus comprises the steps of: determining a orpho-syntactic description for each word token of said natural language text corpus; locating phrases in said natural language text corpus; determining a phrase type for each of said phrases; and locating clauses in said natural language text corpus , and wherein the step of analyzing a natural language query comprises the steps of: determining a morpho-syntactic description for each word token of said natural language query; and locating phrases in said natural language query; determining a phrase type for each of said phrases; and locating clauses in said natural language query. 9. The method according to claim 8 , wherein the step of indexing and storing comprises the steps of: providing, for each word token of said natural language text corpus with, a unique word token location identifier; storing information regarding the location of each word token of said natural language text corpus, based on said unique word token location identifiers; storing, for each phrase type, information regarding the location of each phrase of this type in said natural language text corpus, based on said unique word token location identifiers; and storing information regarding the location of each clause in said natural language text corpus, based on said unique word token location identifiers. 10. The method according to claim 9, wherein each word token is associated with a word type, and wherein the step of storing information regarding the location of each word token comprises the steps of: storing each word type of said natural language text corpus; and storing, for each word token, its unique word token location identifier logically linked to the stored associated word type. 11. The method according to claim 10, wherein the step of storing information regarding the locations of phrases comprises the steps of : providing, for each phrase of said natural language text corpus, a unique phrase location identifier identifying the word tokens spanned by the phrase; storing each phrase type of said natural language text corpus; and storing, for each phrase, its unique phrase location identifier logically linked to the stored associated phrase type. 12. The method according to claim 11, wherein the step of storing information regarding the locations of clauses comprises the steps of: providing, for each clause of said natural language text corpus, a unique clause location identifier identifying the word tokens spanned by the clause; storing, for each clause, its unique clause location identifier logically linked to the stored associated text unit of type clause. 13. The method according to claim 12, further comprising the steps of: locating sentences in said natural language text corpus ; and providing, for each sentence of said natural language text corpus, a unique sentence location identifier identifying the word tokens spanned by the sentence; storing, for each sentence, its unique sentence location identifier logically linked to the stored associated text unit of type sentence. 14. The method according to claim 13, further comprising the steps of: locating paragraphs in said natural language text corpus; providing, for each paragraph of said natural language text corpus, a unique paragraph location identifier identifying the word tokens spanned by the paragraph; storing, for each paragraph, its unique paragraph location identifier logically linked to the stored associated text unit of type paragraph. 15. The method according to claim 14, further comprising the steps of: locating documents in said natural language text corpus ; providing, for each document of said natural language text corpus, a unique document location identifier identifying the word tokens spanned by the document; storing, for each document, its unique document location identifier logically linked to the stored associated text unit of type document. 16. The method according to any one of claims 1-15, wherein, in the step of extracting, a portion of text that is extracted is either said string of word tokens, a clause comprising said string of word tokens, a sentence comprising said string of word tokens, a paragraph comprising said string of word tokens, or a document comprising said string of word tokens. 17. The method according to any one of claims 1-16, further comprising the step of: organizing the extracted information according to degree of correspondence with the query with respect to lexical meaning of word tokens and surface syntactic roles of constituents, such that a constituent in a portion of text having the same lemma as the equivalent constituent of the query is considered to have a higher degree of correspondence than a constituent in a portion of text being a synonym to the equivalent constituent of the query. 18. The method according to any one of claims 1-17, further comprising the step of: organizing the extracted information such that said portions of text are grouped according to sameness of grammatical subject, grammatical object, and lexical main verb. 19. A system for extracting information from a natural language text corpus based on a natural language query, comprising: a text analysis unit (502) for analyzing a natural language text corpus and a natural language query with respect to surface structure of word tokens and surface syntactic roles of constituents; storage means (504) operatively connected to said text analysis unit, for storing the analyzed natural language text corpus; an indexer (506) , operatively connected to said storage means, for indexing the analyzed natural language text corpus; an index (508) , operatively connected to said indexer, for storing said indexed analyzed natural language text corpus; and a result manager (512) operatively connected to said index, for extracting, from said indexed and stored analyzed natural language text corpus, each portion of text comprising a string of word tokens that is equivalent to said analyzed natural language query with respect to lexical meaning of word tokens and surface syntactic roles of constituents. 20. The system according to claim 19, wherein a string of word tokens in said indexed and stored analyzed natural language text corpus is equivalent to said analyzed natural language query if it comprises the head words of phrases bearing the grammatical relations of subject, object, and lexical main verb in said analyzed natural language query. 21. The system according to claim 19, further comprising: a query manager (610) , operatively connected to said text analysis unit, comprising means (620) for creating surface variants of said natural language query, said surface variants being equivalent to said natural language query with respect to lexical meaning of word tokens and surface syntactic roles of constituents, and means (622) for comparing said surface variants and said analyzed natural language query with the indexed analyzed natural language text corpus in said index, and wherein said result manager (512) is adapted to extract, from said indexed and stored analyzed natural language text corpus, each portion of text comprising a string of word tokens that matches any one of said surface variants or said analyzed natural language query. 22. The system according to claim 21, wherein a string of word tokens in said indexed and stored analyzed natural language text corpus matches one of said surface variants or said analyzed natural language query if it comprises the head words of phrases bearing the grammatical relations of subject, object, and lexical main verb in said one of said surface variants or said analyzed natural language query in the same linear order as in said one of said surface variants or said analyzed natural language query. 23. The system according to any one of claims 19-22, wherein said index comprises multiple indexes based on a strict hierarchy of text units that are related by inclusion. 24. A computer readable medium having computer- executable instructions for a general-purpose computer to perform the steps recited in any one of the claims 1-18. 25. A computer program comprising computer- executable instructions for performing the steps recited in any one of the claims 1-18.

Inventors: BRAROE PETER A, EJERHED EVA, BRAROE, PETER, A., EJERHED, EVA
Applicants: BRAROE PETER A, EJERHED EVA, HAPAX INFORMATION SYSTEMS AB, BRAROE, PETER, A., EJERHED, EVA
Application year: 2001
Main classification: G06F17
IPC codes: G06F17