Now that I think about it, and can be stripped using a callback function as the 'normalize' argument to my KeywordProcessor class:

def normalize(value):
   value = value.strip()

   if value.startswith("and"):
       value = value[3:]

   return value

parser = KeywordProcessor(',', normalize=normalize, result=list)

        — Alice.

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to