Lexical Tools

Flow Specific Option - Synonym Restriction

  • Description:

    Filters the output generated from the synonym flows. This option is used to control the variants generated by the synonym modules. Its argument can be C, E, N, CE, CN, EN, CEN. A conservative policy is applied when the combination of above options is chosen for the recursive synonyms. In other words, The algorithm of recursive does not change when combination options (CE, CN, EN, CEN) are chosen. Instead, only the results are restricted by these options.

    • C (CUI): restricts the outputs to CUI, which are:
      • English terms in Metathesaurus,
      • not chemical, drugs, etc.
      • have same CUI
      • base forms in Lexicon
      • have POS of adj, noun, or verb
      • not acronyms or abbreviations
    • E (EUI): restricts the outputs to EUI, which are nominalization and spVars from Lexicon. The EUI of the mapping key synonym is displayed.
    • N (NLP): restricts the outputs to NLP. In 2017 release, NLP option only include original LVG data. In other words, this option is the same as the previous version.
    • CE (CUI and EUI): restricts the outputs to CUI and EUI.
    • CN (CUI and NLP): restricts the outputs to CUI and NLP.
    • EN (EUI and NLP): restricts the outputs to EUI and NLP.
    • CEN (all): No restriction on the outputs on synonym sources. This is the default option.


  • Features:
    1. Restrict the output for synonym flows by source.


  • Symbol: ks:STR

  • Examples:
    shell> lvg -f:y -ks:CEN -m
    plant
    plant|botanic|1|1|y|1|FACT|plant|plant|noun|botanic|adj|NLP_LVG|
    plant|phytogenous|1|1|y|1|FACT|plant|plant|noun|phytogenous|adj|NLP_LVG|
    plant|Plantae|128|1|y|1|FACT|plant|plant|noun|Plantae|noun|C0032098|
    plant|planting|128|1|y|1|FACT|plant|plant|verb|planting|noun|E0048176|
    plant|vegetal|1|1|y|1|FACT|plant|plant|noun|vegetal|adj|NLP_LVG|
    plant|Viridiplantae|128|1|y|1|FACT|plant|plant|noun|Viridiplantae|noun|C0032098|
    
    shell> lvg -f:y -ks:C -m
    plant
    plant|Plantae|128|1|y|1|FACT|plant|plant|noun|Plantae|noun|C0032098|
    plant|Viridiplantae|128|1|y|1|FACT|plant|plant|noun|Viridiplantae|noun|C0032098|
    
    shell> lvg -f:y -ks:E -m
    plant
    plant|planting|128|1|y|1|FACT|plant|plant|verb|planting|noun|E0048176|
    
    shell> lvg -f:y -ks:N -m
    plant
    plant|botanic|1|1|y|1|FACT|plant|plant|noun|botanic|adj|NLP_LVG|
    plant|phytogenous|1|1|y|1|FACT|plant|plant|noun|phytogenous|adj|NLP_LVG|
    plant|vegetal|1|1|y|1|FACT|plant|plant|noun|vegetal|adj|NLP_LVG|
    
    shell> lvg -f:y -ks:CE -m
    plant
    plant|Plantae|128|1|y|1|FACT|plant|plant|noun|Plantae|noun|C0032098|
    plant|planting|128|1|y|1|FACT|plant|plant|verb|planting|noun|E0048176|
    plant|Viridiplantae|128|1|y|1|FACT|plant|plant|noun|Viridiplantae|noun|C0032098|
    
    shell> lvg -f:y -ks:CN -m
    plant
    plant|botanic|1|1|y|1|FACT|plant|plant|noun|botanic|adj|NLP_LVG|
    plant|phytogenous|1|1|y|1|FACT|plant|plant|noun|phytogenous|adj|NLP_LVG|
    plant|Plantae|128|1|y|1|FACT|plant|plant|noun|Plantae|noun|C0032098|
    plant|vegetal|1|1|y|1|FACT|plant|plant|noun|vegetal|adj|NLP_LVG|
    plant|Viridiplantae|128|1|y|1|FACT|plant|plant|noun|Viridiplantae|noun|C0032098|
    
    shell> lvg -f:y -ks:EN -m
    plant
    plant|botanic|1|1|y|1|FACT|plant|plant|noun|botanic|adj|NLP_LVG|
    plant|phytogenous|1|1|y|1|FACT|plant|plant|noun|phytogenous|adj|NLP_LVG|
    plant|planting|128|1|y|1|FACT|plant|plant|verb|planting|noun|E0048176|
    plant|vegetal|1|1|y|1|FACT|plant|plant|noun|vegetal|adj|NLP_LVG|
    

  • Implementation Logic:
    1. Implemented in the OutputFilter and ToSynonyms classes.