berkmancenter / namae

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

The Honorable title #17

Closed danchenkov closed 8 years ago

danchenkov commented 8 years ago

The Honorable and some other titles are not handled correctly. Is there a way to override racc rules?

Namae.parse('The Honorable Chelsea Block')
=> [#<Name family="Block" given="The Honorable Chelsea">]
inukshuk commented 8 years ago

It should be sufficient to adjust the lexer patterns. Take a look at Namae::Parser.instance.options -- specifically the :title regex.