berkmancenter / namae

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

Add rabbi and cantor to list of religious titles #24

Closed benbalter closed 6 years ago

benbalter commented 6 years ago

Great project! This pull request adds rabbi and cantor to the list of recognized religious titles (like father or pastor).

I believe I did it right. I updated parser.y, ran bundle exec rake racc, wrote a test, and committed the results.

Testing locally, the titles are recognized as expected.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 97.81% when pulling 0b9c5e0be9f8cf50ad56febe2d5b116ea2849e68 on benbalter:add-rabbi-and-cantor into eab5cb106025e2f5a19ec67cf09cf8ea10c69ad4 on berkmancenter:master.

inukshuk commented 6 years ago

Thanks!

Just a quick note that these titles are used by the lexer only; that means you don't need to recompile the grammar if they change and, more importantly, they can be changed dynamically. I say this because the matches in the title can be problematic (e.g., if you have proper names 'Pastor' or 'Rabbi' etc.). So the patterns in the options are really intended as examples and you may want to adjust them to your locale.