berkmancenter / namae

Namae (名前) parses personal names and splits them into their component parts.
159 stars 32 forks source link

ESQ suffix breaks name parsing #44

Open kingIZZZY opened 2 years ago

kingIZZZY commented 2 years ago
> Namae.parse('BRYANT H DUNIVAN JR, ESQ')
=> []
> Namae.parse('JAMES W GOVIN, ESQ')
=> [#<Name family="JAMES W GOVIN" given="ESQ">]
inukshuk commented 2 years ago

Thanks!

One thing you could do right away is adjust the title lexer patterns at Namae::Parser.instance.options to your needs.

kingIZZZY commented 2 years ago

Thanks! Adding it to suffix seems to have helped in this case. I hope that doesn't break any other name parsing... is ESQ supposed to be considered a title or a suffix?