Uninvert phrase around commas

  • Short Description: Uninvert the input phrase around commas.

  • Full Description:

    Controlled vocabularies sometimes invert terms, so that the important part of the term, the head, is at the beginning of the term. For example, the term "Percutaneous Coronary Transluminal Angioplasty" could be inverted to be "Angioplasty, Transluminal, Percutaneous Coronary". This flow undoes this inversion.

    No effect on the -m option. "none" is added at the end of the output.

  • Difference: None

  • Features:
    1. Tokenize phrase by using commas as delimiters.
    2. Check tokens if they are belong to same phrase (no space between)
    3. Uninvert input phrases around commas.


  • Symbol: u

  • Examples:
    
    shell> lvg -f:u
    Angioplasty, Transluminal, Percutaneous Coronary
    Angioplasty, Transluminal, Percutaneous Coronary|Percutaneous Coronary Transluminal Angioplasty|2047|16777215|u|1|
    
    More examples

  • Implementation Logic:
    1. Tokenize phrases around commas
    2. If there is no space between comma and the following phrase, consider these tokens are belonging to the same phrase.
    3. Compose tokens in the reverse order.

  • Source Code: ToUninvert.java

  • Hierarchy: Object -> Transformation -> ToUninvert