Linguistic search system

Abstract: A method of searching for information in a text database, comprising: receiving (s1) at least one user input, the user input(s) defining a natural language expression, converting (s2, s3) the natural language expression to a tagged form (50, 51) including part-of-speech tags, applying (s4) to the tagged form (51) one or more grammar rules of the language of the natural language expression (49), to derive a regular expression (52), and analysing (s5) the text database to determine whether there is a match between said regular expression (52) and a portion of said text database. An apparatus for carrying out this techniques is also disclosed. Users may find portions of a text which match multiword expressions given by the user. Matches include possible variations that are relevant with the initial criteria from a linguistic point of view including simple inflections like plural/singular, masculine/feminine or conjugated verbs and even more complex variations like the insertion of additional adjectives, adverbs, etc. in between the words specified by the user.

Description: The present invention relates to data processing, and more particularly to techniques for searching for information in a text database or corpus. Most of the techniques in use to retrieve a piece of information in a text corpus are based on substring search (also known as full-text search). Because this basic string search mechanism is weak when the user wants to catch more than a simple sequence of characters, various techniques have been developed by data providers to enhance the substring matching. Examples include wildcards, regular expressions, Boolean operators, proximity factor (e.g. words must be in the same sentence or no more than N words between two words) and stemming. Existing techniques often try to achieve the similar goals: to allow the user to better express the variability of the natural language in which the string expression is to be searched in order not to miss any place where this expression appears. "A French Text Recognition Model for Information Retrieval System" by Antonladis et al (proceedings of the International Conference on Research and Development in Information Retrieval (SIGIR). Grenoble, June 13 to June 15, 1988, No. Conf. 11, 13 June 1988, pages 67 to 84 discloses a textbook recognition model which matches the documents of a collection with requests of a user. Noun phrase structures are extracted from their request in the same way that the noun phrases are extracted from the documents. In particular, the retrieval phrase brings into play ad hoc paraphrases linked with the application and thus with the domain covered by the document collection. These paraphrases are related to the linguistic paraphrases. Paraphrasing can also include assigning the same type of compliments to propositional phrases preceded by different prepositions, the passage from the morphological base of a word to its root or the passage from an adjectival phrase to a preposition one. It is the object of this invention to. provide a user friendly method and a programmable data-processing apparatus of searching for information in a text database. This object is achieved by the subject matters of claims 1 and 5. Preferred embodiments are the subject matter of the dependent claims. Embodiments of the invention will now be described, by way of example, with reference to the accompanying drawings, in which: Figure 1 is a schematic block diagram of the computer which may be used to implement the techniques according to an embodiment of the present invention; and Figure 2 is a schematic flow diagram of the steps in carrying out a linguistic search according to an embodiment of the present invention. It will be appreciated that the present invention may be implemented using conventional computer technology. The invention has been implemented in Perl & C++ on a Sun workstation running SunOS. It will be appreciated that the invention may be implemented using a PC running Windows™, a Mac running MacOS, or a minicomputer running UNIX, which are well known in the art. For example, the PC hardware configuration is discussed in detail in The Art of Electronics , 2nd Edn, Ch, 10, P. Horowitz and W. Hill, Cambridge University Press, 1989, and is illustrated in Fig. 1. Stated briefly, the system comprises, connected to common bus 30, a central processing unit 32, memory devices including random access memory (RAM) 34, read only memory (ROM) 36 and disk, tape or CD-ROM drives 38, keyboard 12 (not shown), mouse 14 (not shown), printing, plotting or scanning devices 40, and A/D, D/A devices 42 and digital input/output devices 44 providing interfacing to external devices 46 such as the rest of a LAN (not shown). Figure 2 is a schematic flow diagram of the steps performed in carrying out a linguistic search according to an embodiment of the present invention. It will be apparent to persons skilled in the art that where references are made herein to steps, operations or manipulations involving characters, words, passages of text, etc., these are implemented, where appropriate, by means of software controlled processor operations upon machine readable (e.g. ASCII code) representations of such characters, words and text. For the sake of illustrating the techniques according to the invention, the case is considered where the French expression " système distribué " (equivalent to "distributed system" in English) is to be searched for in a French corpus by the user. Initially (step s1), the user specifies the multiword expression he is looking for, for example, using the type of graphical user interface which is well known in the art. There is no need to pay attention to the formulation of this expression: nouns and/or adjectives can be plural or singular, verbs can be conjugated, etc. Next, at step s2, the expression is then sent to the tagger (or disambiguator), such as are available from Xerox Corp. Taggers are discussed in more detail in McEnery T. and Wilson A., Corpus Linguistics, Ch. 5, section 3 and Appendix B. The tagger (or disambiguator) does two things ― (1) reduce each word to its root form (e.g. distribué becomes distribuer - infinitive form of the verb), and (2) determine the part-of-speech of each word (e.g. système is a singular noun - NOUN_SG- and distribué is a singular adjective -ADJ_SG-). NOUN_SG and ADJ_SG are called tags. Each tag is made of two parts: the syntactic category (or part-of-speech like NOUN, ADJ, VERB, etc.) and the morphological feature (like SG, PL, etc.) which reflects the inflection of the word. Once the tagged form 50 has been obtained, it is then simplified, at step s3: because it is desired that the linguistic search process retrieves all possible inflections of a word each tag is first reduced to its syntactic category. The gender, number or person of a word is useless for the linguistic search, and is removed. Preferably, this comprises replacing each of "SG", "PL", etc. with a neutral symbol (*) so as to encompass all possibilities of morphological feature. The process continues at step s4, in which the simplified tagged form 51 is operated on. Given the grammar of a language it is possible to determine what kind of variations a multiword expression can undergo without changing its initial meaning. The following discussion presents some of the rules that have been used for French to generate variations around nominal phrases: (1) In between a noun and an adjective one can insert adjectives, adverbs, or past participates possibly connected by a co-ordinating conjunctions like et ( and ) , ou ( or ), etc. Figure 2 illustrates the application of this rule to the expression systèmes distribués and shows a simplified version of the resulting regular expression (the symbol ⊗ represents the word preceding the tag). As an example, there follow some linguistic variations caught by this regular expression: ⇒ systèmes distribués (distributed systems - plural form) ⇒ systèmes relationnels distribués (distributed relational systems - inserted adjective) ⇒ système redondant et totalement distribué (fully redundant and distributed system - inserted adjective and adverb joined by a co-ordinating conjunction) (2) In between a noun and a preposition or a preposition and a noun, additional adjectives can be inserted. (3) In between 2 nouns, additional adjectives can be inserted. The rules listed above apply to French noun phrases. They can be extended to any other kind of phrases, including those containing verbs, and also to any other language. It is to be noted that these rules can be almost as complex as desired if it is thought that there is a good chance for the selected portion of text to be still relevant with your initial query. For instance one could allow the insertion of a new noun phrase in between the noun and the adjective like in " système à tolérance de panne distribué " ( distributed fault tolerant system ) or even more complex is the insertion of a relative clause like in " un système qui, par nature, est totalement distribué " ( a system which, by essence, is fully distributed ). The grammar rules expressed in step s4 are coded in a regular expression and matched against the simplified tagged form 51 of the user query. If one of those rules matches, then the simplified tagged form 51 of the user query transforms into a complex regular expression representing the grammar variations. Each rule is applied in sequence and only once in order to avoid the recursive application of a grammar rule to itself or to others. The matching regular expression 52 is then processed further at step s5. Once the final regular expression 52 has been generated it is matched against the tagged version of the corpus. With respect to this step, it is important to note the following. (1) As stated above the matching process has to be made on a tagged version of the text corpus. This may be done using a tagger, such as that available from Xerox Corp., as mentioned above. The tagging phase can be made either on the fly, if the text varies frequently, or once for all if it is stable. (2) If the corpus is large, a simple sequential search on the tagged text will take too much time To speed up this phase a full text indexing engine can be used. But instead of indexing the original text as most full-text search engines do, the indexing mechanism is applied to the tagged version of the text corpus. (3) Most existing full-text indexing engines cannot handle search queries expressed with complex regular expressions. As a consequence the expression generated by the linguistic search system according to the present invention cannot be given as is to the search engine. In fact, a preliminary search is made on the individual words of the simplified tagged expression (see step s2). Depending on how sophisticated the indexing engine is, it can provide the user with very basic information like the name of the files in which those words have been found (like the glimpse search engine does) or much more accurate information like the position of the sentence in which those words were found (like the Xerox PARC Text Database (TDB) does). This preliminary step reduces the scope of relevant (portion of) documents and decreases the time required by the regular expressions matching process. (4) The current implementation of an embodiment of the linguistic search system according to the invention is based on the regular expression conventions ofPerl (or any flavour of awk). It will be appreciated by persons skilled in the art that it could be easily transposed to the regular expression formalism used by the Finite State Transducers developed by Xerox Corp. (see EP-A-583,083). The matching mechanism is based on the regular expressions ofPerl rather than the Finite State transducers developed by Xerox because Perl (and awk) tells the user not only what portion of the text matched but also where it is located in the corpus. This information is particularly noticeable in order to highlight the places where a match occurred. This feature has two advantages: (1) avoid leafing through long documents to find places where matches occurred (See step s6 discussed below); and (2) show the whole matching multiword expression which can be quite different from the one typed by the user if the linguistic variations allowed by the grammar rules are complex. Step s6 is performed after the regular expression has been matched against the tagged version of the corpus. As mentioned above, the Perl (or awk) regular expressions mechanism can tell the userwhat string matches but also where this string is located in the text. However because according to the invention the regular expression matching is done on the tagged version of the corpus, the positioning information is not suitable for the original text. As a consequence, if it is desired to highlight the matches a way must be provided to go from the offset in the tagged text into the actual offset in the original text. Currently, this is made via a simple offset table built during the corpus tagging. It will be appreciated that numerous modifications may be made in implementing the techniques according to the invention. The linguistic search could be applied to WEB search engines. Although their query languages tend to be more and more sophisticated it's not yet close to a linguistic search. The process explained above assumes that the corpus to be searched is first disambiguated (or tagged). However, it will be appreciated that it would be possible to use the techniques according to the invention as a front-end to the WEB search engine, for example. Here, the requirement is to generate all the possible forms of a word and search for all of them with a conventional search engine (or at least the substring which is common to all the derived form of a word). Then the selected documents need to be retrieved for further processing (tagging) before the linguistic search can be applied.

Claims: A method of searching for information in a text database, comprising: (a) receiving at least one user input, the at least one user input defining a natural language expression (49) including one or more words, characterized by the steps of: (b) converting the natural language expression to a tagged form (50, 51) of the natural language expression, the tagged form of the natural language expression including said one or more words and, a part-of-speech tag associated with each word of the natural language expression; (c) applying to the tagged form (51) of the natural language expression one or more grammar rules of the language of the natural language expression (49), to derive a regular expression (52), based on the one or more words and the part-of-speech tag: and (d) analyzing the tagged form of the text database to determine whether there is a match between said regular expression (52) and a portion of said text database. The method of claim 1, wherein step (b) further comprises the steps of: tagging the natural language expression comprising, for each word in said natural language expression, (b1) converting that word to its root form, and (b2) applying the part-of-speech tag to the root form of that word, to generate a complex tagged form (50). The method of claim 2, wherein the part-of-speech tag includes a syntactic category marker and a morphological feature marker, and wherein step (b) further comprises the step of: (b3) simplifying said complex tagged form (50) by removing each morphological feature marker, to generate a simplified tagged form (51). The method of claim 1, 2 or 3, further including the step of (e) determining the location within said text database of the match with said regular expression (52). A programmable data processing apparatus, the apparatus including a program storage device operatively connected to a user interface for performing a method of searching, said method comprising: (a) receiving at least one user input, the at least one user input being a natural language expression including at least one word; characterized by the steps of: (b) converting the natural language expression to a tagged form of the natural language expression, the tagged form of the natural language expression including the at least one word and a part of speech tag associated with each word of the natural language expression; (c) applying to the tagged form of the natural language expression one or more grammar rules of a language of the natural language expression to derive a regular expression based on the at least one word and the part of speech tag; and (d) analyzing a text database to determine whether there is a match between said regular expression and a portion of said text database.

Inventors: JULLIARD LAURENT, JULLIARD, LAURENT
Applicants: XEROX CORP, XEROX CORPORATION
Application year: 1998
Main classification: G06F17
IPC codes: G06F17