def make_stem_cleaner(stem):
 if (stem[(-1)] == 's'):
  stem = stem[:(-1)]
 if (len(stem) > 2):
  return _memoized_stem_cleaner(stem)
 return nop

def make_stem_cleaner ( stem ) : if ( stem [ ( - 1 ) ] == 's' ) : stem = stem [ : ( - 1 ) ] if ( len ( stem ) > 2 ) : return _memoized_stem_cleaner ( stem ) return nop
returns a function that can be used to remove the stem from a sentence .