@@ -580,16 +580,18 @@ def parse_pieces(self, parts, additional_parts_count=0):
580580
581581 def join_on_conjunctions (self , pieces , additional_parts_count = 0 ):
582582 """
583- Join conjunctions to surrounding pieces, e.g.:
583+ Join conjunctions to surrounding pieces. Title- and prefix-aware. e.g.:
584584
585- ['Mr.', 'and'. 'Mrs.', 'John', 'Doe']
586- v
587- ['Mr. and Mrs.', 'John', 'Doe']
585+ ['Mr.', 'and'. 'Mrs.', 'John', 'Doe'] ==>
586+ ['Mr. and Mrs.', 'John', 'Doe']
588587
589-
590- ['The', 'Secretary', 'of', 'State', 'Hillary', 'Clinton']
591- v
592- ['The Secretary of State', 'Hillary', 'Clinton']
588+ ['The', 'Secretary', 'of', 'State', 'Hillary', 'Clinton'] ==>
589+ ['The Secretary of State', 'Hillary', 'Clinton']
590+
591+ When joining titles, saves newly formed piece to the instance's titles
592+ constant so they will be parsed correctly later. E.g. after parsing the
593+ example names above, 'The Secretary of State' and 'Mr. and Mrs.' would
594+ be present in the titles constant set.
593595
594596 :param list pieces: name pieces strings after split on spaces
595597 :param int additional_parts_count:
0 commit comments