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.

    When the -m flag is specified, the fact that applied is reported along with the history of the mutations. The format is as follows:

    
    |FACT|term for synonyms|category|synonym|category|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.


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


  • Symbol: r

  • Examples:
    
    shell> lvg -f:r -m
    chest
    chest|pectoral|1|1|r|1|FACT|chest|noun|pectoral|adj|y|
    chest|breast|128|1|r|1|FACT|pectoral|adj|breast|noun|yy|
    chest|mammary|1|1|r|1|FACT|breast|noun|mammary|adj|yyy|
    chest|thoracic|1|1|r|1|FACT|chest|noun|thoracic|adj|y|
    
    More example

  • Implementation Logic:
    1. Generate synonyms based on the input term.
    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