Lexical Tools

Generate synonyms, recursively

  • Short Description: Generate synonyms, recursively

  • Full Description:

    Recursively retrieves synonyms from the input. That is, return the synonyms of synonyms ... until there are no more, or until a cycle is detected. After 2017+ release, there are three synonym sources (CUI, EUI, and NLP), different algorithm are applied to generate the recursive synonyms for different types of synonym source:

    • Recursive synonyms must have the same type of sources.
    • If the source is CUI, only synonyms from the same CUI are retrieved.
    • If the source is EUI, all synonyms with EUI source are retrieved.
    • If the source is NLP, synonyms from same NLP source are retrieved.

    For example, synonyms of "success" are:


    synonyms of "succeed" are:

    the recusive synonyms of "success" are:

    They are detailed as follows:
    • success -> succeed (E0058772)
    • succeed -> succession (E0058769)

    When the -m flag is specified, the fact that applied in the last step in the recursive synonyms is reported along with the history of the mutations. The format is as follows:
    |FACT|term for synonyms|category|synonym|category|sSource|history|


  • Difference:
    1. The order of display synonym is different. This difference is caused by the difference of display order between Berkeley B-tree and database.
    2. The mutation information is different when -m option is used.
    3. With choosing show detail option, -d, all paths of synonyms can be traced in the Java version.
    4. The synonym source option is added after 2017+ release

  • Features:
    1. Generate synonym recursively until there are no more or a cycle is detected.

  • Symbol: r

  • Examples:
    shell> lvg -f:r -m
    More example

  • Implementation Logic:
    1. Generate synonyms based on the input term and source.
    2. Generate synonyms based on the generated synonyms, repeatedly.
    3. Check if the generated synonym is new. If so, add to the output.
    4. The check is on term and category only. Inflections of all derivations are set to be base (1).

  • Source Code: ToRecursiveSynonyms.java

  • Hierarchy: Object -> Transformation -> ToRecursiveSynonyms