1. A method implemented in a data processing apparatus for retrieving from among more than one library document those matching the content of a sequence of query words, comprising the steps of: (a) defining a set of equivalent words for each of the query words and assigning a word equivalence value to each of said equivalent words; and (b) computing a relevance factor for a library document, comprising the steps of: (i) locating target sequences of words in the library document that match the sequence of query words, and equivalence thereof, according to a set of matching criteria; (ii) evaluating similarity values of said target sequences of words, each similarity value being evaluated as a function of the equivalence values of words included in the corresponding target sequence; and (iii) said relevance factor being computed as a function of the similarity values of its target sequences.