Skip to content

Commit b741412

Browse files
committed
documentation fixes
1 parent 10f34e4 commit b741412

5 files changed

Lines changed: 18 additions & 19 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ __pycache__/
55
.python2/
66
MANIFEST
77
nameparser.egg-info/
8-
dummycert.pem
98
build
109
*.egg
1110
.coverage

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Contributing
44
Development Environment Setup
55
--------------------------------
66

7-
There are some exernal dependencies required in order to run the
7+
There are some external dependencies required in order to run the
88
tests, located in the dev-requirements.txt file.
99

1010
pip install -r dev-requirements.txt

docs/customize.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ instantiate the :py:class:`~nameparser.parser.HumanName` class (see below).
3939
Editable attributes of nameparser.config.CONSTANTS
4040
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4141

42-
* :py:obj:`~nameparser.config.CONSTANTS.titles` - Pieces that come before the name. Includes all `first_name_titles`. Cannot include things that may be first names.
43-
* :py:obj:`~nameparser.config.CONSTANTS.first_name_titles` - Titles that, when followed by a single name, that name is a first name, e.g. "King David".
44-
* :py:obj:`~nameparser.config.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.".
45-
* :py:obj:`~nameparser.config.CONSTANTS.suffix_not_acronyms` - Pieces that come at the end of the name that never have periods separating the letters, e.g. "Jr.".
46-
* :py:obj:`~nameparser.config.CONSTANTS.conjunctions` - Connectors like "and" that join the preceding piece to the following piece.
47-
* :py:obj:`~nameparser.config.CONSTANTS.prefixes` - Connectors like "del" and "bin" that join to the following piece but not the preceding, similar to titles but can appear anywhere in the name.
48-
* :py:obj:`~nameparser.config.CONSTANTS.capitalization_exceptions` - Dictionary of pieces that do not capitalize the first letter, e.g. "Ph.D".
49-
* :py:obj:`~nameparser.config.CONSTANTS.regexes` - Regular expressions used to find words, initials, nicknames, etc.
42+
* :py:data:`~nameparser.config.titles.TITLES` - Pieces that come before the name. Includes all `first_name_titles`. Cannot include things that may be first names.
43+
* :py:data:`~nameparser.config.FIRST_NAME_TITLES` - Titles that, when followed by a single name, that name is a first name, e.g. "King David".
44+
* :py:data:`~nameparser.config.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.".
45+
* :py:data:`~nameparser.config.SUFFIX_NOT_ACRONYMS` - Pieces that come at the end of the name that never have periods separating the letters, e.g. "Jr.".
46+
* :py:data:`~nameparser.config.conjunctions.CONJUNCTIONS` - Connectors like "and" that join the preceding piece to the following piece.
47+
* :py:data:`~nameparser.config.prefixes.PREFIXES` - Connectors like "del" and "bin" that join to the following piece but not the preceding, similar to titles but can appear anywhere in the name.
48+
* :py:data:`~nameparser.config.CAPITALIZATION_EXCEPTIONS` - Dictionary of pieces that do not capitalize the first letter, e.g. "Ph.D".
49+
* :py:data:`~nameparser.config.regexes.REGEXES` - Regular expressions used to find words, initials, nicknames, etc.
5050

5151
Each set of constants comes with :py:func:`~nameparser.config.SetManager.add` and :py:func:`~nameparser.config.SetManager.remove` methods for tuning
5252
the constants for your project. These methods automatically lower case and

nameparser/config/prefixes.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
from __future__ import unicode_literals
33

44
#: Name pieces that appear before a last name. Prefixes join to the piece
5-
# that follows them to make one new piece. They can be chained together, e.g
6-
# "von der" and "de la". Because they only appear in middle or last names,
7-
# they also signifiy that all following name pieces should be in the same name
8-
# part, for example, "von" will be joined to all following pieces that are not
9-
# prefixes or suffixes, allowing recognition of double last names when they
10-
# appear after a prefixes. So in "pennie von bergen wessels MD", "von" will
11-
# join with all following name pieces until the suffix "MD", resulting in the
12-
# correct parsing of the last name "von bergen wessels".
5+
#: that follows them to make one new piece. They can be chained together, e.g
6+
#: "von der" and "de la". Because they only appear in middle or last names,
7+
#: they also signifiy that all following name pieces should be in the same name
8+
#: part, for example, "von" will be joined to all following pieces that are not
9+
#: prefixes or suffixes, allowing recognition of double last names when they
10+
#: appear after a prefixes. So in "pennie von bergen wessels MD", "von" will
11+
#: join with all following name pieces until the suffix "MD", resulting in the
12+
#: correct parsing of the last name "von bergen wessels".
1313
PREFIXES = set([
1414
'abu',
1515
'bin',

nameparser/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ def is_conjunction(self, piece):
296296
def is_prefix(self, piece):
297297
"""
298298
Lowercase and no periods version of piece is in the
299-
`~nameparser.config.titles.PREFIXES` set.
299+
:py:data:`~nameparser.config.prefixes.PREFIXES` set.
300300
"""
301301
return lc(piece) in self.C.prefixes
302302

0 commit comments

Comments
 (0)