Skip to content

Commit 4b32019

Browse files
committed
add list of constants to docs
1 parent 3120e4f commit 4b32019

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

LICENSE

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
Copyright Derek Gulbranson <derek73 at gmail>.
22
http://derekgulbranson.com/
33

4-
Parser logic based on PHP nameParser.php by G. Miernicki
5-
http://code.google.com/p/nameparser/
6-
74
-----
85

96
LGPL

docs/customize.rst

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,24 @@ directly to the attribute.
4949
Customizing the Parser with Your Own Configuration
5050
==================================================
5151

52-
Recognition of titles, prefixes, suffixes and conjunctions is provided by
52+
Recognition of titles, prefixes, suffixes and conjunctions is handled by
5353
matching the lower case characters of a name piece with pre-defined sets
54-
of strings located in :py:mod:`nameparser.config`. You can easily adjust
54+
of strings located in :py:mod:`nameparser.config`. You can adjust
5555
these predefined sets to help fine tune the parser for your dataset.
5656

57+
Parser Constants:
5758

58-
Changing the Predefined Variables
59+
* `CONSTANTS.titles` - Pieces that come before the name. Cannot include things that may be first names
60+
* `CONSTANTS.first_name_titles` - Titles that, when followed by a single name, that name is a first name, e.g. "King David"
61+
* `CONSTANTS.suffix_acronyms` - Pieces that come at the end of the name that may or may not have periods separating the letters, e.g. "m.d."
62+
* `CONSTANTS.suffix_not_acronyms` - Pieces that come at the end of the name that never have periods separating the letters, e.g. "Jr."
63+
* `CONSTANTS.conjunctions` - Connectors like "and" that join the preceeding piece to the following piece.
64+
* `CONSTANTS.prefixes` - Connectors like "del" and "bin" that join to the following piece but not the preceeding
65+
* `CONSTANTS.capitalization_exceptions` - Dictionary of pieces that do not capitalize the first letter, e.g. "Ph.D"
66+
* `CONSTANTS.regexes` - Regular expressions used to find words, initials, nicknames, etc.
67+
68+
69+
Changing the Parser Constants
5970
+++++++++++++++++++++++++++++++++
6071

6172
There are a few ways to adjust the parser configuration depending on your

0 commit comments

Comments
 (0)