python-nameparser icon indicating copy to clipboard operation
python-nameparser copied to clipboard

Additional nickname delimiter specifications

Open aikimark opened this issue 5 years ago • 1 comments

I've got a large file of names/addresses and decided to try the nameparser library with my name field. I was able to get more of my names parsed correctly by adding two regex patterns and adding these regex patterns to the list. In regexes.py, added: ('double_apos', re.compile(r"''(.?)''", re.U)), ('apos', re.compile(r"'(.?)'", re.U)),

In parser.py, added: re_apos = self.C.regexes.apos re_double_apos = self.C.regexes.double_apos

In parser.py, changed: for _re in (re_quoted_word, re_double_quotes, re_parenthesis, re_double_apos, re_apos):

aikimark avatar Jul 22 '20 06:07 aikimark

This seems like a good idea and not too hard to do.

derek73 avatar Aug 09 '20 19:08 derek73