Remove Genitive

  • Short Description: Remove possessives

  • Full Description:

    This is useful when trying to normalize terms such as Down's Syndrome and Down Syndrome to one form.

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

  • Difference:
    1. New version trims output terms (remove spaces at the beginning and ending of the term).


  • Features:
    1. Remove " 's " and " 'S " at the end of any words in the input term.
    2. Remove " s' " and " S' " at the end of any words in the input term.
    3. Remove " x' " and " X' " at the end of any words in the input term.
    4. Remove " z' " and " Z' " at the end of any words in the input term.


  • Symbol: g

  • Examples:
    
    shell> lvg -f:g
    Down Syndrome|Down Syndrome|2047|16777215|g|1|
    Downs' Syndrome|Downs Syndrome|2047|16777215|g|1|
    Downx' Syndrome|Downx Syndrome|2047|16777215|g|1|
    Downz' Syndrome|Downz Syndrome|2047|16777215|g|1|
    Down's Syndrome|Down Syndrome|2047|16777215|g|1|
    Down's's Syndrome|Down Syndrome|2047|16777215|g|1|
    
    More examples

  • Implementation Logic:
    1. Tokenize each word from the input term by using StringTokenizer.
    2. For each word, remove " s' " at the end of the word.
    3. For each word, remove " x' " at the end of the word.
    4. For each word, remove " z' " at the end of the word.
    5. For each word, remove " 's " at the end of the word.
    6. Trim each word.

  • Source Code: ToRemoveGenitive.java

  • Hierarchy: Object -> Transformation -> ToRemoveGenitive