Because of a lapse in government funding, the information on this website may not be up to date, transactions submitted via the website may not be processed, and the agency may not be able to respond to inquiries until appropriations are enacted. The NIH Clinical Center (the research hospital of NIH) is open. For more details about its operating status, please visit cc.nih.gov. Updates regarding government operating status and resumption of normal operations can be found at OPM.gov.

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:

    success|succeed|1024|1|y|1|FACT|success|success|noun|succeed|verb|E0058772|
    

    synonyms of "succeed" are:
    succeed|success|128|1|y|1|FACT|succeed|succeed|verb|success|noun|E0058769|
    succeed|succession|128|1|y|1|FACT|succeed|succeed|verb|succession|noun|E0058769|
    

    the recusive synonyms of "success" are:
    success|succeed|1024|1|r|1|FACT|success|noun|succeed|verb|E0058772|y|
    success|succession|128|1|r|1|FACT|succeed|verb|succession|noun|E0058769|yy|
    

    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|

    where,



  • 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
    die
    die|death|128|1|r|1|FACT|die|verb|death|noun|E0022536|y|
    die|expire|1024|1|r|1|FACT|die|verb|expire|verb|NLP_LVG|y|
    die|terminate|1024|1|r|1|FACT|expire|verb|terminate|verb|NLP_LVG|yy|
    
    chest
    chest|pectoral|1|1|r|1|FACT|chest|noun|pectoral|adj|NLP_LVG|y|
    chest|breast|128|1|r|1|FACT|pectoral|adj|breast|noun|NLP_LVG|yy|
    chest|thoracic|1|1|r|1|FACT|chest|noun|thoracic|adj|NLP_LVG|y|
    
    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