Query Manipulation Server 25.4
Query Manipulation Server Help

# Name Variant Expansion

QMS can automatically detect names in query text and expand the original query to include variants of the name, such as using initials, the name with a title, translations, phonetically similar names, and common nicknames.

NOTE: You do not need to configure QMS rules for name variant expansion. However, you must obtain the `combined_names.ecr` grammar from the Named Entity Recognition Grammars package. To obtain this package, contact OpenText support.

When you configure name variants, QMS uses a Named Entity Recognition grammar to match names in the query text. When it finds a name, it sends a query to the Content component to find any variants of this name that occur in your index. QMS then modifies the original query to include the name variants by using a `SYNONYM` operator, in a similar way to how it adds synonyms for exact phrase search (see Expand Exact Phrase Searches).

## Configure Name Variants

To use name variant expansion, you must configure the locations of your Named Entity Recognition grammar, post-processing script, and the data files that QMS needs to expand names.

You obtain the `combined_names.ecr` grammar and `pii_postprocessing.lua` script from the Named Entity Recognition Grammars package. The `namevariants.dat` and `hyph_en_US.dic` data files are included in the QMS installation.

You configure the locations of these files by using the `[NameVariants]` configuration section. For example:

    [NameVariants]
    GrammarDirectory=qms/namevariants/grammars
    DataDirectory=qms/namevariants/data

For more information, see NameVariants Parameters.

NOTE: QMS name expansion queries use Soundex operators when it queries the Content component to retrieve phonetically similar and transliterated names. To use this type of variant, you must set the `Soundex` configuration parameter to 1 in your Content configuration file.

For more information, refer to the Content component Help.

## Send Name Variant Queries

You send a name variant query by using the ExpandNames action parameter with your query.

For example, to search for "John Smith" and variants of that name, you can use the following query:

    action=Query&Text=John Smith&ExpandNames=True

and QMS might produce the following expanded query, where each of the listed variants exists in a document in Content.

    'SYNONYM("J Smith","J. Smith","JOHN Jimmy SMITH","JOHN SMITH","John A. Smith","John James Smith","John Jimmy Smith","John Smith","Johnny Smith","Mr. Smith","Джон Смит")'

By default, QMS does not perform name expansions on exact phrases (that is, text in quotation marks `""`). For example, the following query returns only results for John Smith:

    action=Query&Text="John Smith"&ExpandNames=True

To expand exact phrases, you can set ExpandPhrases to True on the query, in the same way as for synonym rule queries (see Expand Exact Phrase Searches). For example:

    action=Query&Text="John Smith"&ExpandNames=True&ExpandPhrases=True

## Name Variant Examples

The following table lists the name variant types that QMS can find, with examples:

Variant Type | Example Match | Example Expansions
--- | --- | ---
initials | John Smith | J Smith, J. Smith
titles | James Watt | James Watt Jr, Dr. Watt
missing components (that is, part of the name is missing) | John Clayton Smith | John Smith
out of order components (such as last name before first name) | Jimmy John Smith | John Jimmy Smith
phonetic similarity | Claire Brown | Claire Browne
nicknames | Ted Brown | Ed Brown, Eddy Brown, Edgar Brown, Ned Brown
translations | Clementine Blom | Клементина Блом
transliteration | Abdul Hussein | Abd al-Hussein
compound names (such as hyphenated names written without a hyphen) | Mary-Ellen Smith | Maryellen Smith
truncated name components | Ronald McDonald | Ron McDonald

Copyright 2025 Open Text
Version 25.4 | Last updated October 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery Query Manipulation Server 25.4

Topic Title: Name Variant Expansion