Remove Parenthetic Plural Forms of (s), (es), (ies)

  • Short Description: Remove parenthetic plural forms of (s), (es), (ies)

  • Full Description:

    This is useful when trying to normalize terms include parenthetic plural forms of:

    • (s), such as finger(s), toe(s), rib(s), etc.
    • (es), such as Mass(es), exostosis(es), plexus(es), fetus(es), etc.
    • (ies), such as pneumonectomy(ies), extremity(ies), etc.
    This flow component is used in Norm and LuiNorm to normalize plural pattern of (s), (es), and (ies).

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

  • Difference:
    1. None


  • Features: Remove "(s)", "(es)", "(ies)" from the input term:
    1. Remove "(es)"
    2. Remove "(ies)"
    3. Remove "(s)" if no exceptional pattern matches.
    4. Replace "(s)" with " " if followed by a letter


  • Symbol: rs

  • Examples:
    
    shell> lvg -f:rs
    Assault(s)
    Assault(s)|Assault|2047|16777215|rs|1|
    Burn(s);skin
    Burn(s);skin|Burn;skin|2047|16777215|rs|1|
    [D]Chill(s) NOS
    [D]Chill(s) NOS|[D]Chill NOS|2047|16777215|rs|1|
    Abdomen CT Adrenal Mass(es) Bilateral
    Abdomen CT Adrenal Mass(es) Bilateral|Abdomen CT Adrenal Mass Bilateral|2047|16777215|rs|1|
    Donor pneumonectomy(ies) with preparation
    Donor pneumonectomy(ies) with preparation|Donor pneumonectomy with preparation|2047|16777215|rs|1|
    [X]O spontn disrptn/lig(s)knee
    [X]O spontn disrptn/lig(s)knee|[X]O spontn disrptn/lig knee|2047|16777215|rs|1|
    
    J(s)(a) ANTIGEN
    J(s)(a) ANTIGEN|J(s)(a) ANTIGEN|2047|16777215|rs|1|
    Bacillus phage rho11(s)
    Bacillus phage rho11(s)|Bacillus phage rho11(s)|2047|16777215|rs|1|
    9(s)-erythromycylamine
    9(s)-erythromycylamine|9(s)-erythromycylamine|2047|16777215|rs|1|
    XLalpha(s) protein
    XLalpha(s) protein|XLalpha(s) protein|2047|16777215|rs|1|
    
    More examples

  • Implementation Logic:
    • Remove (es) and (ies)
    • Locate (s) and find the partial term before (s).
    • Go through the reversed trie (rules of pattern)
      • If exceptional pattern match, keep input term the same
      • If exceptional pattern doesn't match:
        • Replace (s) with a space (" ") if followed by a letter
        • Remove (s), otherwise

    Please refer to Remove plural patterns of (s), (es), and (ies) software components for details.


  • Source Code: ToRemoveS.java

  • Hierarchy: Object -> Transformation -> ToRemoveS