royal we
This commit is contained in:
parent
25d2019506
commit
17179a7edd
1 changed files with 12 additions and 4 deletions
|
|
@ -383,10 +383,6 @@ def pronoun_to_viewpoints(
|
||||||
|
|
||||||
# check if pronoun maps to multiple options and differentiate
|
# check if pronoun maps to multiple options and differentiate
|
||||||
# but don't allow invalid differentiators
|
# but don't allow invalid differentiators
|
||||||
if is_iter(source_gender):
|
|
||||||
gender = gender if gender in source_gender else source_gender[0]
|
|
||||||
else:
|
|
||||||
gender = source_gender
|
|
||||||
if is_iter(source_type):
|
if is_iter(source_type):
|
||||||
pronoun_type = pronoun_type if pronoun_type in source_type else source_type[0]
|
pronoun_type = pronoun_type if pronoun_type in source_type else source_type[0]
|
||||||
else:
|
else:
|
||||||
|
|
@ -397,6 +393,18 @@ def pronoun_to_viewpoints(
|
||||||
else:
|
else:
|
||||||
viewpoint = target_viewpoint
|
viewpoint = target_viewpoint
|
||||||
|
|
||||||
|
# special handling for the royal "we"
|
||||||
|
if is_iter(source_gender):
|
||||||
|
gender_opts = list(source_gender)
|
||||||
|
else:
|
||||||
|
gender_opts = [source_gender]
|
||||||
|
if viewpoint == "1st person":
|
||||||
|
# make sure plural is always an option when converting to 1st person
|
||||||
|
# it doesn't matter if it's in the list twice, so don't bother checking
|
||||||
|
gender_opts.append("plural")
|
||||||
|
# if the gender is still not in the extended options, fall back to source pronoun's default
|
||||||
|
gender = gender if gender in gender_opts else gender_opts[0]
|
||||||
|
|
||||||
# step down into the mapping
|
# step down into the mapping
|
||||||
viewpoint_map = PRONOUN_MAPPING[viewpoint]
|
viewpoint_map = PRONOUN_MAPPING[viewpoint]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue