Reverse the gender of a string

From Rosetta Code
Reverse the gender of a string is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.

The task is to create a function that reverses the gender of the text of a string. The function should take one arguments being a string to undergo the sex change. The returned string should contain this initial string, with all references to gender switched.

print rev_gender("She was a soul stripper. She took my heart!")
He was a soul stripper. He took my heart!

FreeBASIC[edit]

Although in principle all gender-related words in the dictionary could be swapped, I've only attempted to swap the 3rd person pronouns, possessive pronouns and possessive adjectives here. Even then, without code to understand the context, some swaps are ambiguous - for example 'her' could map to 'his' or 'him' and 'his' could map to 'her' or 'hers'.

To avoid swapping words which have already been swapped, thereby nullifying the original swap, I've appended an underscore to each replacement word and then removed all the underscores when all swaps have been made. This assumes, of course, that the text didn't include any underscores to start with.

' FB 1.05.0 Win64
 
Function isWordChar(s As String) As Boolean
Return ("a" <= s AndAlso s <= "z") OrElse ("A" <= s AndAlso s <= "Z") OrElse("0" <= s AndAlso s <= "9") OrElse s = "_"
End Function
 
Function revGender(s As Const String) As String
If s = "" Then Return ""
Dim t As String = s
Dim word(1 To 10) As String = {"She", "she", "Her", "her", "hers", "He", "he", "His", "his", "him"}
Dim repl(1 To 10) As String = {"He_", "he_", "His_", "his_" ,"his_", "She_", "she_", "Her_", "her_", "her_"}
Dim As Integer index, start, after
For i As Integer = 1 To 10
start = 1
While start <= Len(t) - Len(word(i)) + 1
index = Instr(start, t, word(i))
If index = 0 Then Exit While
after = index + Len(word(i))
If index = 1 AndAlso after <= Len(t) AndAlso CInt(isWordChar(Mid(t, after, 1))) Then
start = after
Continue While
End If
If index > 1 AndAlso after <= Len(t) AndAlso _
(CInt(isWordChar(Mid(t, index - 1, 1))) OrElse CInt(isWordChar(Mid(t, after, 1)))) Then
start = after
Continue While
End If
t = Left(t, index - 1) + repl(i) + Mid(t, after)
start = index + Len(repl(i))
Wend
Next
' now remove all underscores
For i As Integer = Len(t) To 1 Step -1
If Mid(t, i, 1) = "_" Then
t = Left(t, i - 1) + Mid(t, i + 1)
End If
Next
Return t
End Function
 
Print revGender("She was a soul stripper. She took his heart!")
Print revGender("He was a soul stripper. He took her heart!")
Print revGender("She wants what's hers, he wants her and she wants him!")
Print revGender("Her dog belongs to him but his dog is hers!")
Print
Print "Press any key to quit"
Sleep
Output:
He was a soul stripper. He took her heart!
She was a soul stripper. She took his heart!
He wants what's his, she wants his and he wants her!
His dog belongs to her but her dog is his!

J[edit]

Note that we cannot do a good job for the general case of english text using simple rules. For example, consider:

  • Give her the book. It is her book.
  • Give him the book. It is his book.


For this simple example, to determine whether to change her to him or his we would need a grammatical representation of the surrounding context.

So, for now, we limit ourselves to the simple case specified in the task example, and do not even do all that great of a job there, either:

cheaptrick=: rplc&(;:'She He He She')

And, the task example:

   cheaptrick 'She was a soul stripper. She took my heart!'
He was a soul stripper. He took my heart!
cheaptrick cheaptrick 'She was a soul stripper. She took my heart!'
She was a soul stripper. She took my heart!

Java[edit]

Translation of: J
public class ReallyLameTranslationOfJ {
 
public static void main(String[] args) {
String s = "She was a soul stripper. She took my heart!";
System.out.println(cheapTrick(s));
System.out.println(cheapTrick(cheapTrick(s)));
}
 
static String cheapTrick(String s) {
if (s.contains("She"))
return s.replaceAll("She", "He");
else if(s.contains("He"))
return s.replaceAll("He", "She");
return s;
}
}
He was a soul stripper. He took my heart!
She was a soul stripper. She took my heart!

Kotlin[edit]

This program uses a similar approach to the FreeBASIC entry:

// version 1.0.6
 
fun reverseGender(s: String): String {
var t = s
val words = listOf("She", "she", "Her", "her", "hers", "He", "he", "His", "his", "him")
val repls = listOf("He_", "he_", "His_", "his_" ,"his_", "She_", "she_", "Her_", "her_", "her_")
for (i in 0 until words.size) {
val r = Regex("""\b${words[i]}\b""")
t = t.replace(r, repls[i])
}
return t.replace("_", "")
}
 
fun main(args: Array<String>) {
println(reverseGender("She was a soul stripper. She took his heart!"))
println(reverseGender("He was a soul stripper. He took her heart!"))
println(reverseGender("She wants what's hers, he wants her and she wants him!"))
println(reverseGender("Her dog belongs to him but his dog is hers!"))
}
Output:
He was a soul stripper. He took her heart!
She was a soul stripper. She took his heart!
He wants what's his, she wants his and he wants her!
His dog belongs to her but her dog is his!

PowerShell[edit]

Translation of: J
(Made more PowerShelly.)
 
function Switch-Gender ([string]$String)
{
if ($String -match "She")
{
$String.Replace("She", "He")
}
elseif ($String -match "He")
{
$String.Replace("He", "She")
}
else
{
$String
}
}
 
Switch-Gender "She was a soul stripper. She took my heart!"
Switch-Gender (Switch-Gender "She was a soul stripper. She took my heart!")
 
Output:
He was a soul stripper. He took my heart!
She was a soul stripper. She took my heart!

Python[edit]

#!/usr/bin/env python
# -*- coding: utf-8 -*- #
 
import re
male2female=u"""maleS femaleS, maleness femaleness,
him her, himself herself, his her, his hers, he she,
Mr Mrs, Mister Missus, Ms Mr, Master Miss, Master Mistress,
uncleS auntS, nephewS nieceS, sonS daughterS, grandsonS granddaughterS,
brotherS sisterS, man woman, men women, boyS girlS, paternal maternal,
grandfatherS grandmotherS, GodfatherS GodmotherS, GodsonS GoddaughterS,
fiancéS fiancéeS, husband wife, husbands wives, fatherS motherS,
bachelorS spinsterS, bridegroomS brideS, widowerS widowS,
KnightS DameS, Sir DameS, KingS QueenS, DukeS DuchessES, PrinceS PrincessES,
Lord Lady, Lords Ladies, MarquessES MarchionessES, EarlS CountessES, ViscountS ViscountessES,
ladS lassES, sir madam, gentleman lady, gentlemen ladies, BaronS BaronessES,
stallionS mareS, ramS eweS, coltS fillieS, billy nanny, billies nannies, bullS cowS,
godS goddessES, heroS heroineS, shirtS blouseS, undies nickers, sweat glow,
jackarooS jillarooS, gigoloS hookerS, landlord landlady, landlords landladies,
manservantS maidservantS, actorS actressES, CountS CountessES, EmperorS EmpressES,
giantS giantessES, heirS heiressES, hostS hostessES, lionS lionessES, managerS manageressES,
murdererS murderessES, priestS priestessES, poetS poetessES, shepherdS shepherdessES,
stewardS stewardessES, tigerS tigressES, waiterS waitressES,
cockS henS, dogS bitchES, drakeS henS, dogS vixenS,
tomS tibS, boarS sowS, buckS roeS, peacockS peahenS,
gander goose, ganders geese, friarS nunS, monkS nunS, Adam Eve,
Aaron Erin, Adrian Adriana, Aidrian Aidriana, Alan Alaina, Albert Alberta,
Alex Alexa, Alex Alexis, Alexander Alaxandra, Alexander Alexandra,
Alexander Alexis, Alexandra Alexander, Alexei Alexis, Alfred Alfreda,
Andrew Andrea, Andrew Andrea, Angel Angelica, Anthony Antonia,
Antoine Antoinette, Ariel Arielle, Ashleigh Ashley,
Barry Barrie, Benedict Benita, Benjamin Benjamine, Bert Bertha,
Brandon Brandi, Brendan Brenda, Briana Brian, Brian Rianne,
Caela Caesi, Caeleb Caeli, Carl Carla, Carl Carly, Carolus Caroline,
Charles Caroline, Charles Charlotte, Christian Christa, Christian Christiana,
Christian Christina, Christopher Christina, Christopher Christine,
Clarence Claire, Claude Claudia, Clement Clementine, Cory Cora,
Daniel Daniella, Daniel Danielle, David Davena, David Davida,
David Davina, Dean Deanna, Devin Devina,
Edward Edwina, Edwin Edwina, Emil Emilie, Emil Emily, Eric Erica, Erick Erica,
Erick Ericka, Ernest Ernestine, Ethan Etha, Ethan Ethel, Eugene Eugenie,
Fabian Fabia, Francesco Francesca, Frances Francesca, Francis Frances,
Francis Francine, Frederick Fredrica, Fred Freda, Fredrick Frederica,
Gabriel Gabriella, Gabriel Gabrielle, Gene Jean, George Georgia, george georgina,
George Georgina, Gerald Geraldine, Giovanni Giovanna, Glen Glenn,
Harry Harriet, Harry Harriette, Heather Heath, Henry Henrietta, Horace Horatia,
Ian Iana, Ilija Ilinka, Ivo Ivy, Ivan Ivy,
Jack Jackelyn, Jack Jackie, Jack Jaclyn, Jack Jacqueline, Jacob Jacobine,
James Jamesina, James Jamie, Jaun Jaunita, Jayda Jayden, Jesse Jessica,
Jesse Jessie, Joe Johanna, Joel Joelle, John Jean, John Joan,
John Johanna, Joleen Joseph, Jon Joane, Joseph Josephine, Joseph Josphine,
Julian Julia, Julian Juliana, Julian Julianna, Justin Justine,
Karl Karly, Kendrick Kendra, Ken Kendra, Kian Kiana, Kyle Kylie,
Laurence Laura, Laurence Lauren, Laurence Laurencia, Leigh Leigha,
Leon Leona, Louis Louise, Lucas Lucia, Lucian Lucy, Luke Lucia, Lyle Lyla,
Maria Mario, Mario Maricela, Mark Marcia, Marshall Marsha, Martin martina,
Martin Martina, Martin Martine, Max Maxine, Michael Michaela, Michael Micheala,
Michael Michelle, Mitchell Michelle, Nadir Nadira, Nicholas Nicole, Nicholas Nicki,
Nicholas Nicole, Nicky Nikki, Nicolas Nicole, Nigel Nigella, Noel Noelle,
Oen Ioena, Oliver Olivia,
Patrick Patricia, Paul Paula, Phillip Phillipa, Phillip Pippa,
Quintin Quintina,
Reginald Regina, Richard Richardine, Robert Roberta, Robert Robyn, Ronald Rhonda,
Ryan Rhian, Ryan Ryanne,
Samantha Samuel, Samuel Samantha, Samuel Sammantha, Samuel Samuela,
Sean Sian, Sean Siana, Shaun Shauna, Sheldon Shelby, Sonny Sunny,
Stephan Stephanie, Stephen Stephanie, Steven Stephanie,
Terry Carol, Terry Carrol, Theodore Theadora, Theodore Theodora,
Theodore Theordora, Thomas Thomasina, Tristan Tricia, Tristen Tricia,
Ulric Ulrika, Valentin Valentina, Victor Victoria,
William Wilhelmina, William Willa, William Willamina,
Xavier Xaviera, Yarden Yardena, Zahi Zahira, Zion Ziona"""

 
re_nl=re.compile(r",[ \n]*")
m2f=[ tok.split(" ") for tok in re_nl.split(male2female) ]
 
switch={}
words=[]
 
 
re_plural=re.compile("E*S$")
re_ES=re.compile("ES$")
 
def gen_pluralize(m,f):
# do plurals first
yield re_plural.sub("",m),re_plural.sub("",f)
yield re_ES.sub("es",m),re_ES.sub("es",f)
yield re_plural.sub("s",m),re_plural.sub("s",f)
 
def gen_capitalize_pluralize(m,f):
for m,f in gen_pluralize(m,f):
yield m.capitalize(), f.capitalize()
yield m,f
 
def gen_switch_role_capitalize_pluralize(m,f):
for m,f in gen_capitalize_pluralize(m,f):
yield m,f
yield f,m
 
for m,f in m2f:
for xy,xx in gen_switch_role_capitalize_pluralize(m,f):
if xy not in switch:
switch[xy]=xx
words.append(xy)
 
words="|".join(words)
 
re_word=re.compile(ur"\b("+words+ur")\b")
 
text=u'''When a new-hatched savage running wild about his native
woodlands in a grass clout, followed by the nibbling goats, as if
he were a green sapling; even then, in Queequeg's ambitious soul,
lurked a strong desire to see something more of Christendom than
a specimen whaler or two. His father was a High Chief, a King;
his uncle a High Priest; and on the maternal side he boasted aunts
who were the wives of unconquerable warriors. There was excellent
blood in his veins-royal stuff; though sadly vitiated, I fear,
by the cannibal propensity he nourished in his untutored youth.'''

 
 
def rev_gender(text):
text=re_word.split(text)
return "".join([ word+switch[gen] for word,gen in zip(text[::2],text[1::2])])+text[-1]
 
print rev_gender(text)

Output:

When a new-hatched savage running wild about her native
woodlands in a grass clout, followed by the nibbling goats, as if
she were a green sapling; even then, in Queequeg's ambitious soul,
lurked a strong desire to see something more of Christendom than
a specimen whaler or two. Her mother was a High Chief, a Queen;
her aunt a High Priestess; and on the paternal side she boasted uncles
who were the husbands of unconquerable warriors. There was excellent
blood in her veins-royal stuff; though sadly vitiated, I fear,
by the cannibal propensity she nourished in her untutored youth.

Racket[edit]

 
#lang at-exp racket
 
(define raw-mapping @~a{
maleS femaleS, maleness femaleness, him her, himself herself, his her, his
hers, he she, Mr Mrs, Mister Missus, Ms Mr, Master Miss, MasterS MistressES,
uncleS auntS, nephewS nieceS, sonS daughterS, grandsonS granddaughterS,
brotherS sisterS, man woman, men women, boyS girlS, paternal maternal,
grandfatherS grandmotherS, GodfatherS GodmotherS, GodsonS GoddaughterS,
fiancéS fiancéeS, husband wife, husbands wives, fatherS motherS, bachelorS
spinsterS, bridegroomS brideS, widowerS widowS, KnightS DameS, Sir DameS,
KingS QueenS, DukeS DuchessES, PrinceS PrincessES, Lord Lady, Lords Ladies,
MarquessES MarchionessES, EarlS CountessES, ViscountS ViscountessES, ladS
lassES, sir madam, gentleman lady, gentlemen ladies, BaronS BaronessES,
stallionS mareS, ramS eweS, coltS fillieS, billy nanny, billies nannies,
bullS cowS, godS goddessES, heroS heroineS, shirtS blouseS, undies nickers,
sweat glow, jackarooS jillarooS, gigoloS hookerS, landlord landlady,
landlords landladies, manservantS maidservantS, actorS actressES, CountS
CountessES, EmperorS EmpressES, giantS giantessES, heirS heiressES, hostS
hostessES, lionS lionessES, managerS manageressES, murdererS murderessES,
priestS priestessES, poetS poetessES, shepherdS shepherdessES, stewardS
stewardessES, tigerS tigressES, waiterS waitressES, cockS henS, dogS bitchES,
drakeS henS, dogS vixenS, tomS tibS, boarS sowS, buckS roeS, peacockS
peahenS, gander goose, ganders geese, friarS nunS, monkS nunS, Adam Eve,
Aaron Erin, Adrian Adriana, Aidrian Aidriana, Alan Alaina, Albert Alberta,
Alex Alexa, Alex Alexis, Alexander Alaxandra, Alexander Alexandra, Alexander
Alexis, Alexandra Alexander, Alexei Alexis, Alfred Alfreda, Andrew Andrea,
Angel Angelica, Anthony Antonia, Antoine Antoinette, Ariel Arielle, Ashleigh
Ashley, Barry Barrie, Benedict Benita, Benjamin Benjamine, Bert Bertha,
Brandon Brandi, Brendan Brenda, Briana Brian, Brian Rianne, Caela Caesi,
Caeleb Caeli, Carl Carla, Carl Carly, Carolus Caroline, Charles Caroline,
Charles Charlotte, Christian Christa, Christian Christiana, Christian
Christina, Christopher Christina, Christopher Christine, Clarence Claire,
Claude Claudia, Clement Clementine, Cory Cora, Daniel Daniella, Daniel
Danielle, David Davena, David Davida, David Davina, Dean Deanna, Devin
Devina, Edward Edwina, Edwin Edwina, Emil Emilie, Emil Emily, Eric Erica,
Erick Erica, Erick Ericka, Ernest Ernestine, Ethan Etha, Ethan Ethel, Eugene
Eugenie, Fabian Fabia, Francesco Francesca, Frances Francesca, Francis
Frances, Francis Francine, Frederick Fredrica, Fred Freda, Fredrick
Frederica, Gabriel Gabriella, Gabriel Gabrielle, Gene Jean, George Georgia,
George Georgina, Gerald Geraldine, Giovanni Giovanna, Glen Glenn, Harry
Harriet, Harry Harriette, Heather Heath, Henry Henrietta, Horace Horatia, Ian
Iana, Ilija Ilinka, Ivo Ivy, Ivan Ivy, Jack Jackelyn, Jack Jackie, Jack
Jaclyn, Jack Jacqueline, Jacob Jacobine, James Jamesina, James Jamie, Jaun
Jaunita, Jayda Jayden, Jesse Jessica, Jesse Jessie, Joe Johanna, Joel Joelle,
John Jean, John Joan, John Johanna, Joleen Joseph, Jon Joane, Joseph
Josephine, Joseph Josphine, Julian Julia, Julian Juliana, Julian Julianna,
Justin Justine, Karl Karly, Kendrick Kendra, Ken Kendra, Kian Kiana, Kyle
Kylie, Laurence Laura, Laurence Lauren, Laurence Laurencia, Leigh Leigha,
Leon Leona, Louis Louise, Lucas Lucia, Lucian Lucy, Luke Lucia, Lyle Lyla,
Maria Mario, Mario Maricela, Mark Marcia, Marshall Marsha, Martin martina,
Martin Martine, Max Maxine, Michael Michaela, Michael Micheala, Michael
Michelle, Mitchell Michelle, Nadir Nadira, Nicholas Nicole, Nicholas Nicki,
Nicky Nikki, Nicolas Nicole, Nigel Nigella, Noel Noelle, Oen Ioena, Oliver
Olivia, Patrick Patricia, Paul Paula, Phillip Phillipa, Phillip Pippa,
Quintin Quintina, Reginald Regina, Richard Richardine, Robert Roberta, Robert
Robyn, Ronald Rhonda, Ryan Rhian, Ryan Ryanne, Samantha Samuel, Samuel
Samantha, Samuel Sammantha, Samuel Samuela, Sean Sian, Sean Siana, Shaun
Shauna, Sheldon Shelby, Sonny Sunny, Stephan Stephanie, Stephen Stephanie,
Steven Stephanie, Terry Carol, Terry Carrol, Theodore Theadora, Theodore
Theodora, Theodore Theordora, Thomas Thomasina, Tristan Tricia, Tristen
Tricia, Ulric Ulrika, Valentin Valentina, Victor Victoria, William
Wilhelmina, William Willa, William Willamina, Xavier Xaviera, Yarden Yardena,
Zahi Zahira, Zion Ziona})
 
(define flip-map (make-hash))
 
(for ([m (reverse (regexp-split #px"\\s*,\\s*" raw-mapping))])
(define p (string-split m))
(unless (= 2 (length p)) (error "Bad raw data"))
(define (map! x y)
(hash-set! flip-map (string-foldcase x) (string-foldcase y))
(hash-set! flip-map (string-upcase x) (string-upcase y))
(hash-set! flip-map (string-titlecase x) (string-titlecase y)))
(define (2map! x y) (map! x y) (map! y x))
(apply 2map! p)
(apply 2map! (map (λ(x) (regexp-replace #rx"E?S$" x "")) p)))
 
(define (reverse-gender str)
(regexp-replace* #px"\\w+" str
(λ(word) (hash-ref flip-map word word))))
 
(displayln (reverse-gender @~a{
She was a soul stripper. She took my heart!
 
When a new-hatched savage running wild about his native
woodlands in a grass clout, followed by the nibbling goats, as if
he were a green sapling; even then, in Queequeg's ambitious soul,
lurked a strong desire to see something more of Christendom than
a specimen whaler or two. His father was a High Chief, a King;
his uncle a High Priest; and on the maternal side he boasted aunts
who were the wives of unconquerable warriors. There was excellent
blood in his veins-royal stuff; though sadly vitiated, I fear,
by the cannibal propensity he nourished in his untutored youth.
}))
 
Output:
He was a soul stripper. He took my heart!

When a new-hatched savage running wild about her native
woodlands in a grass clout, followed by the nibbling goats, as if
she were a green sapling; even then, in Queequeg's ambitious soul,
lurked a strong desire to see something more of Christendom than
a specimen whaler or two. Her mother was a High Chief, a Queen;
her aunt a High Priestess; and on the paternal side she boasted uncles
who were the husbands of unconquerable warriors. There was excellent
blood in her veins-royal stuff; though sadly vitiated, I fear,
by the cannibal propensity she nourished in her untutored youth.

REXX[edit]

Not much effort was put into compressing the words (as far as pluralizing and constructing the various forms of words).   More code could be written to parse words that have a hyphen   (or minus).

The 1st letter of each word in examined and it's case (lower/upper) is preserved.

Given the large size of the table (list), it would make more sense to put the words in a separate file instead of coding them in-line (within the computer program).

/*REXX program reverse genderizes a text string (that may contain gender-specific words)*/
parse value linesize()-1 with sw @ @.  !. /*get screen width, nullify some vars.*/
parse arg old
if old='' then old='When a new-hatched savage running wild about his native woodlands in',
'a grass clout, followed by the nibbling goats, as if he were a green',
'sapling; even then, in Queequegs ambitious soul, lurked a strong' ,
'desire to see something more of Christendom than a specimen whaler' ,
'or two. His father was a High Chief, a King; his uncle a High' ,
'Priest; and on the maternal side he boasted aunts who were the wives',
'of unconquerable warriors. There was excellent blood in his' ,
'veins-royal stuff; though sadly vitiated, I fear, by the cannibal' ,
'propensity he nourished in his untutored youth.'
 
call tell old, ' old ' /*show a nicely parsed "old" text. */
 
♀@[email protected] "abboty abbess"
@[email protected] "actor actress"
@[email protected] "ad-boy ad-girl ad-man ad-woman ad-men ad-women"
@[email protected] "adboy adgirl adman adwoman admen adwomen"
@[email protected] "administrator administratrix"
@[email protected] "adonis belle"
@[email protected] "adulterer adultress"
@[email protected] "agribusinessboy agribusinessgirl"
@[email protected] "agribusinessman agribusinesswoman agribusinessmen agribusinesswomen"
@[email protected] "aidboy aidgirl aidman aidwoman aidmen aidwomen"
@[email protected] "airboy airgirl airman airwoman airmen airwomen"
@[email protected] "aircraftboy aircraftgirl aircraftman aircraftwoman aircraftmen aircraftwomen"
@[email protected] "aircraftsboy aircraftsgirl aircraftsman aircraftswoman aircraftsmen aircraftswomen"
@[email protected] "aircrewboy aircrewgirl aircrewman aircrewwoman aircrewmen aircrewwomen"
@[email protected] "alderboy aldergirl alderman alderwoman aldermen alderwomen"
@[email protected] "almsboy almsgirl"
@[email protected] "almsman almswoman almsmen almswomen"
@[email protected] "alterboy altergirl alterman alterwoman altermen alterwomen"
@[email protected] "alongshoreboy alongshoregirl"
@[email protected] "alongshoreman alongshorewoman alongshoremen alongshorewomen"
@[email protected] "ambassador ambassadress"
@[email protected] "ambulanceboy ambulancegirl ambulanceman ambulancewoman ambulancemen ambulancewomen"
@[email protected] "anchor anchress"
@[email protected] "anchorboy anchorgirl anchorman anchorwoman anchormen anchorwomen"
@[email protected] "apeboy apegirl apeman apewoman apemen apewomen"
@[email protected] "archduke archduchess"
@[email protected] "archer archeress"
@[email protected] "artilleryboy artillerygirl artilleryman artillerywoman artillerymen artillerywomen"
@[email protected] "artsboy artsgirl artsman artswoman artsmen artswomen"
@[email protected] "assboy assgirl assman asswoman assmen asswomen"
@[email protected] "assemblyboy assemblygirl assemblyman assemblywoman assemblymen assemblywomen"
@[email protected] "attackboy attackgirl attackman attackwoman attackmen attackwomen"
@[email protected] "author authoress"
@[email protected] "aviator aviatrix aviators aviatrices"
@[email protected] "axboy axgirl axman axwoman axmen axwomen"
@[email protected] "axeboy axegirl axeman axewoman axemen axewomen"
@[email protected] "bachelor bachelorette bachelor spinster"
@[email protected] "backboy backgirl backman backwoman backmen backwomen"
@[email protected] "backwoodsboy backwoodsgirl backwoodsman backwoodswoman backwoodsmen backwoodswomen"
@[email protected] "badboy badgirl badman badwoman badmen badwomen"
@[email protected] "bagboy baggirl bagman bagwoman bagmen bagwomen"
@[email protected] "baggageboy baggagegirl baggageman baggagewoman baggagemen baggagewomen"
@[email protected] "bail-bondsboy bail-bondsgirl"
@[email protected] "bail-bondsman bail-bondswoman bail-bondsmen bail-bondswomen"
@[email protected] "bailsboy bailsgirl bailsman bailswoman bailsmen bailswomen"
@[email protected] "ballerino ballerina"
@[email protected] "bandsboy bandsgirl bandsman bandswoman bandsmen bandswomen"
@[email protected] "barboy bargirl barman barwoman barmen barwomen barman barmaid"
@[email protected] "bargeboy bargegirl bargeman bargewoman bargemen bargewomen"
@[email protected] "barkeeper barkeeperess"
@[email protected] "baron baroness baronet baronetess"
@[email protected] "baseboy basegirl baseman basewoman basemen basewomen"
@[email protected] "bassboy bassgirl bassman basswoman bassmen basswomen"
@[email protected] "batboy batgirl batman batwoman batmen batwomen"
@[email protected] "batsboy batsgirl batsman batswoman batsmen batswomen"
@[email protected] "bayboy baygirl bayman baywoman baymen baywomen"
@[email protected] "beadsboy beadsgirl beadsman beadswoman beadsmen beadswomen"
@[email protected] "bedesboy bedesgirl bedesman bedeswoman bedesmen bedeswomen"
@[email protected] "beggarboy beggargirl beggarman beggarwoman beggarmen beggarwomen"
@[email protected] "bellboy bellgirl bellman bellwoman bellmen bellwomen"
@[email protected] "benefactor benefactress"
@[email protected] "billboy billgirl billman billwoman billmen billwomen"
@[email protected] "billy nanny billies nannies"
@[email protected] "billygoat nannygoat"
@[email protected] "binboy bingirl binman binwoman binmen binwomen"
@[email protected] "birdboy birdgirl birdman birdwoman birdmen birdwomen"
@[email protected] "blond blonde"
@[email protected] "bluesboy bluesgirl bluesman blueswoman bluesmen blueswomen"
@[email protected] "boar sow"
@[email protected] "boardboy boardgirl boardman boardwoman boardmen boardwomen"
@[email protected] "boatboy boatgirl boatman boatwoman boatmen boatwomen"
@[email protected] "boatsboy boatsgirl boatsman boatswoman boatsmen boatswomen"
@[email protected] "bogeyboy bogeygirl bogeyman bogeywoman bogeymen bogeywomen"
@[email protected] "bogyboy bogygirl bogyman bogywoman bogymen bogywomen"
@[email protected] "boilerboy boilergirl boilerman boilerwoman boilermen boilerwomen"
@[email protected] "bombardboy bombardgirl bombardman bombardwoman bombardmen bombardwomen"
@[email protected] "bondboy bondgirl bondman bondwoman bondmen bondwomen"
@[email protected] "bondsboy bondsgirl bondsman bondswoman bondsmen bondswomen"
@[email protected] "bonesboy bonesgirl bonesman boneswoman bonesmen boneswomen"
@[email protected] "boogeyboy boogeygirl boogeyman boogeywoman boogeymen boogeywomen"
@[email protected] "boogieboy boogiegirl boogieman boogiewoman boogiemen boogiewomen"
@[email protected] "boogyboy boogygirl boogyman boogywoman boogymen boogywomen"
@[email protected] "bookboy bookgirl bookman bookwoman bookmen bookwomen"
@[email protected] "boothboy boothgirl boothman boothwoman boothmen boothwomen"
@[email protected] "bordboy bordgirl bordman bordwoman bordmen bordwomen"
@[email protected] "bowboy bowgirl bowman bowwoman bowmen bowwomen"
@[email protected] "bowsboy bowsgirl bowsman bowswoman bowsmen bowswomen"
@[email protected] "boxboy boxgirl boxman boxwoman boxmen boxwomen"
@[email protected] "boy girl boydom girldom boyhood girlhood"
@[email protected] "boy-band girl-band"
@[email protected] "boy-oh-boy girl-oh-girl"
@[email protected] "boychildren girlchildren"
@[email protected] "boyfriend girlfriend"
@[email protected] "boyish girlish boyism girlism"
@[email protected] "boyish-looking girlish-looking boyishly girlishly boyishness girlishness"
@[email protected] "boylike girllike boylikeness girllikeness boyliker girlliker"
@[email protected] "boylikest girllikest boyscout girlscout boyship girlship"
@[email protected] "brakeboy brakegirl brakeman brakewoman brakemen brakewomen"
@[email protected] "breadboy breadgirl breadman breadwoman breadmen breadwomen"
@[email protected] "breakboy breakgirl breakman breakwoman breakmen breakwomen"
@[email protected] "brethern sistern"
@[email protected] "brickboy brickgirl brickman brickwoman brickmen brickwomen"
@[email protected] "bridegroom bride"
@[email protected] "bridesboy bridesgirl bridesman brideswoman bridesmen brideswomen"
@[email protected] "briefboy briefgirl briefman briefwoman briefmen briefwomen"
@[email protected] "brinksboy brinksgirl brinksman brinkswoman brinksmen brinkswomen"
@[email protected] "bro sis brother sister brotherhood sisterhood brotherly sisterly"
@[email protected] "brotherboy brothergirl brotherman brotherwoman brothermen brotherwomen"
@[email protected] "buck doe"
@[email protected] "bull cow bullshit cowshit"
@[email protected] "busboy busgirl busman buswoman busmen buswomen"
@[email protected] "bushboy bushgirl bushman bushwoman bushmen bushwomen"
@[email protected] "bushelboy bushelgirl bushelman bushelwoman bushelmen bushelwomen"
@[email protected] "businessboy businessgirl businessman businesswoman businessmen businesswomen"
@[email protected] "butcher butcheress"
@[email protected] "butt-boy butt-girl butt-man butt-woman butt-men butt-women"
@[email protected] "butterboy buttergirl butterman butterwoman buttermen butterwomen"
@[email protected] "buttonboy buttongirl buttonman buttonwoman buttonmen buttonwomen"
@[email protected] "cabboy cabgirl cabman cabwoman cabmen cabwomen"
@[email protected] "cakeboy cakegirl cakeman cakewoman cakemen cakewomen"
@[email protected] "caliph calafia caliph calipha"
@[email protected] "cameraboy cameragirl cameraman camerawoman cameramen camerawomen"
@[email protected] "candy-boy candy-girl candy-man candy-woman candy-men candy-women"
@[email protected] "candyboy candygirl candyman candywoman candymen candywomen"
@[email protected] "canoeboy canoegirl canoeman canoewoman canoemen canoewomen"
@[email protected] "carboy cargirl carman carwoman carmen carwomen"
@[email protected] "cartboy cartgirl cartman cartwoman cartmen cartwomen"
@[email protected] "caterer cateress"
@[email protected] "catfisherboy catfishergirl catfisherman catfisherwoman catfishermen catfisherwomen"
@[email protected] "cattleboy cattlegirl cattleman cattlewoman cattlemen cattlewomen"
@[email protected] "cavalryboy cavalrygirl cavalryman cavalrywoman cavalrymen cavalrywomen"
@[email protected] "caveboy cavegirl caveman cavewoman cavemen cavewomen"
@[email protected] "cellarboy cellargirl cellarman cellarwoman cellarmen cellarwomen"
@[email protected] "centerboy centergirl centerman centerwoman centermen centerwomen"
@[email protected] "centreboy centregirl centreman centrewoman centremen centrewomen"
@[email protected] "chainboy chaingirl chainman chainwoman chainmen chainwomen"
@[email protected] "chairboy chairgirl chairman chairwoman chairmen chairwomen"
@[email protected] "chanter chantress"
@[email protected] "chapboy chapgirl chapman chapwoman chapmen chapwomen"
@[email protected] "chapelboy chapelgirl chapelman chapelwoman chapelmen chapelwomen"
@[email protected] "charboy chargirl charman charwoman charmen charwomen"
@[email protected] "checkweighboy checkweighgirl"
@[email protected] "checkweighman checkweighwoman checkweighmen checkweighwomen"
@[email protected] "chessboy chessgirl chessman chesswoman chessmen chesswomen"
@[email protected] "chief chiefess"
@[email protected] "chinaboy chinagirl chinaman chinawoman chinamen chinawomen"
@[email protected] "chineseboy chinesegirl chineseman chinesewoman chinesemen chinesewomen"
@[email protected] "churchboy churchgirl churchman churchwoman churchmen churchwomen"
@[email protected] "cisboy cisgirl cisman ciswoman cismen ciswomen"
@[email protected] "clansboy clansgirl clansman clanswoman clansmen clanswomen"
@[email protected] "classboy classgirl classman classwoman classmen classwomen"
@[email protected] "clergyboy clergygirl clergyman clergywoman clergymen clergywomen"
@[email protected] "clerk clerkess"
@[email protected] "clubboy clubgirl clubman clubwoman clubmen clubwomen"
@[email protected] "coachboy coachgirl coachman coachwoman coachmen coachwomen"
@[email protected] "coadjutor cadutrix"
@[email protected] "coalboy coalgirl coalman coalwoman coalmen coalwomen"
@[email protected] "coastguardsboy coastguardsgirl"
@[email protected] "coastguardsman coastguardswoman coastguardsmen coastguardswomen"
@[email protected] "cock hen"
@[email protected] "cocksboy cocksgirl cocksman cockswoman cocksmen cockswomen"
@[email protected] "cogboy coggirl cogman cogwoman cogmen cogwomen"
@[email protected] "colorboy colorgirl colorman colorwoman colormen colorwomen"
@[email protected] "colourboy colourgirl colourman colourwoman colourmen colourwomen"
@[email protected] "colt fillie"
@[email protected] "commedian comedienne"
@[email protected] "committeeboy committeegirl committeeman committeewoman committeemen committeewomen"
@[email protected] "commonwealthboy commonwealthgirl"
@[email protected] "commonwealthman commonwealthwoman commonwealthmen commonwealthwomen"
@[email protected] "commonwealthsboy commonwealthsgirl"
@[email protected] "commonwealthsman commonwealthswoman commonwealthsmen commonwealthswomen"
@[email protected] "conboy congirl conman conwoman conmen conwomen"
@[email protected] "conductor conductress"
@[email protected] "confessor confessoress"
@[email protected] "congressboy congressgirl congressman congresswoman congressmen congresswomen"
@[email protected] "conquer conqueress"
@[email protected] "cook cookess"
@[email protected] "copeboy copegirl copeman copewoman copemen copewomen"
@[email protected] "cornerboy cornergirl cornerman cornerwoman cornermen cornerwomen"
@[email protected] "cornishboy cornishgirl cornishman cornishwoman cornishmen cornishwomen"
@[email protected] "corpsboy corpsgirl corpsman corpswoman corpsmen corpswomen"
@[email protected] "councilboy councilgirl councilman councilwoman councilmen councilwomen"
@[email protected] "count countess"
@[email protected] "counterboy countergirl counterman counterwoman countermen counterwomen"
@[email protected] "countryboy countrygirl countryman countrywoman countrymen countrywomen"
@[email protected] "cowboy cowgirl cowman cowwoman cowmen cowwomen"
@[email protected] "cracksboy cracksgirl cracksman crackswoman cracksmen crackswomen"
@[email protected] "craftsboy craftsgirl craftsman craftswoman craftsmen craftswomen"
@[email protected] "cragsboy cragsgirl cragsman cragswoman cragsmen cragswomen"
@[email protected] "crayfisherboy crayfishergirl"
@[email protected] "crayfisherman crayfisherwoman crayfishermen crayfisherwomen"
@[email protected] "cyberboy cybergirl cyberman cyberwoman cybermen cyberwomen"
@[email protected] "czar czarina"
@[email protected] "dad mom dada mama daddy mommy daddies mommies"
@[email protected] "dairyboy dairygirl dairyman dairywoman dairymen dairywomen"
@[email protected] "dangerboy dangergirl dangerman dangerwoman dangermen dangerwomen"
@[email protected] "daysboy daysgirl daysman dayswoman daysmen dayswomen"
@[email protected] "deacon deaconess"
@[email protected] "deadboy deadgirl deadman deadwoman deadmen deadwomen"
@[email protected] "debutant debutante"
@[email protected] "demesboy demesgirl demesman demeswoman demesmen demeswomen"
@[email protected] "demon demoness"
@[email protected] "deskboy deskgirl deskman deskwoman deskmen deskwomen"
@[email protected] "devil deviless"
@[email protected] "director directress"
@[email protected] "dirtboy dirtgirl dirtman dirtwoman dirtmen dirtwomen"
@[email protected] "divine divineress"
@[email protected] "divorce divorcee"
@[email protected] "doctor doctress"
@[email protected] "dog bitch dogs bitches"
@[email protected] "dominator dominatrix dominators dominatrices"
@[email protected] "dragon dragoness"
@[email protected] "drake duck"
@[email protected] "draftboy draftgirl draftman draftwoman drafemen drafewomen"
@[email protected] "draftsboy draftsgirl draftsman draftswoman draftsmen draftswomen"
@[email protected] "draughtsboy draughtsgirl draughtsman draughtswoman draughtsmen draughtswomen"
@[email protected] "drayboy draygirl drayman draywoman draymen draywomen"
@[email protected] "drone bee"
@[email protected] "dude dudette"
@[email protected] "duke duchess"
@[email protected] "dutchboy dutchgirl"
@[email protected] "dutchman dutchwoman dutchmen dutchwomen"
@[email protected] "earl countess"
@[email protected] "earthboy earthgirl earthman earthwoman earthmen earthwomen"
@[email protected] "earthsboy earthsgirl earthsman earthswoman earthsmen earthswomen"
@[email protected] "editor editress"
@[email protected] "editor editrix"
@[email protected] "elector electress"
@[email protected] "emperor empress"
@[email protected] "enchanter enchantress"
@[email protected] "englishboy englishgirl englishman englishwoman englishmen englishwomen"
@[email protected] "everyboy everygirl everyman everywoman everymen everywomen"
@[email protected] "ex-boyfriend ex-girlfriend ex-husband ex-wife ex-husbands ex-wives"
@[email protected] "executor executrix executor executres"
@[email protected] "faceboy facegirl faceman facewoman facemen facewomen"
@[email protected] "father mother"
@[email protected] "fatherfucker motherfucker fatherphocker motherphocker fatherfucker mutherfucker"
@[email protected] "fatherhood motherhood"
@[email protected] "fiance fiancee"
@[email protected] "fireboy firegirl fireman firewoman firemen firewomen"
@[email protected] "fisherboy fishergirl fisherman fisherwoman fishermen fisherwomen"
@[email protected] "fishboy fishgirl fishman fishwoman fishmen fishwomen"
@[email protected] "foeboy foegirl foeman foewoman foemen foewomen"
@[email protected] "foreboy foregirl foreman forewoman foremen forewomen"
@[email protected] "freeboy freegirl freedman freedwoman freedmen freedwomen"
@[email protected] "freedboy freedgirl freeman freewoman freemen freewomen"
@[email protected] "frenchboy frenchgirl frenchman frenchwoman frenchmen frenchwomen"
@[email protected] "fretboy fretgirl fretman fretwoman fretmen fretwomen"
@[email protected] "friar nun"
@[email protected] "frontboy frontgirl frontiersboy frontiersgirl"
@[email protected] "frontiersman frontierswoman frontiersmen frontierswomen"
@[email protected] "frontman frontwoman frontmen frontwomen"
@[email protected] "funnyboy funnygirl funnyman funnywoman funnymen funnywomen"
@[email protected] "gander goose ganders geese"
@[email protected] "gasboy gasgirl gasman gaswoman gasmen gaswomen"
@[email protected] "gentleboy gentlegirl gentleman gentlewoman gentlemen gentlewomen"
@[email protected] "giant giantess"
@[email protected] "gigolo hooker"
@[email protected] "gladiator gladiatrix"
@[email protected] "gleeboy gleegirl gleeman gleewoman gleemen gleewomen"
@[email protected] "gloveboy glovegirl"
@[email protected] "gloveman glovewoman glovemen glovewomen"
@[email protected] "god godess"
@[email protected] "godfather godmother godson goddaughter"
@[email protected] "governor governoress"
@[email protected] "gownboy gowngirl gownman gownwoman gownmen gownwomen"
@[email protected] "gownsboy gownsgirl gownsman gownswoman gownsmen gownswomen"
@[email protected] "gramp granny"
@[email protected] "granddad grandmom"
@[email protected] "grandfather grandmother"
@[email protected] "grandnephew grandniece"
@[email protected] "grandpa grandma"
@[email protected] "grandpapa grandmama"
@[email protected] "grandpop grandmom"
@[email protected] "grandson granddaughter"
@[email protected] "great-granddad great-grandmom"
@[email protected] "great-grandfather great-grandmother"
@[email protected] "great-grandnephew great-grandniece"
@[email protected] "great-grandpa great-grandma"
@[email protected] "great-grandpapa great-grandmama"
@[email protected] "great-grandpop great-grandmom"
@[email protected] "great-grandson great-granddaughter"
@[email protected] "great-granduncle great-grandaunt"
@[email protected] "great-granduncle great-grandauntie"
@[email protected] "great-great-granddad great-great-grandmom"
@[email protected] "great-great-grandfather great-great-grandmother"
@[email protected] "great-great-grandnephew great-great-grandniece"
@[email protected] "great-great-grandpa great-great-grandma"
@[email protected] "great-great-grandpapa great-great-grandmama"
@[email protected] "great-great-grandpop great-great-grandmom"
@[email protected] "great-great-grandson great-great-granddaughter"
@[email protected] "great-great-granduncle great-great-grandaunt"
@[email protected] "great-great-granduncle great-great-grandauntie"
@[email protected] "great-great-great-granddad great-great-great-grandmom"
@[email protected] "great-great-great-grandfather great-great-great-grandmother"
@[email protected] "great-great-great-grandnephew great-great-great-grandniece"
@[email protected] "great-great-great-grandpa great-great-great-grandma"
@[email protected] "great-great-great-grandpapa great-great-great-grandmama"
@[email protected] "great-great-great-grandpop great-great-great-grandmom"
@[email protected] "great-great-great-grandson great-great-great-granddaughter"
@[email protected] "great-great-great-granduncle great-great-great-grandaunt"
@[email protected] "great-great-great-granduncle great-great-great-grandauntie"
@[email protected] "great-great-great-great-granddad great-great-great-great-grandmom"
@[email protected] "great-great-great-great-grandfather great-great-great-great-grandmother"
@[email protected] "great-great-great-great-grandnephew great-great-great-great-grandniece"
@[email protected] "great-great-great-great-grandpa great-great-great-great-grandma"
@[email protected] "great-great-great-great-grandpapa great-great-great-great-grandmama"
@[email protected] "great-great-great-great-grandpop great-great-great-great-grandmom"
@[email protected] "great-great-great-great-grandson great-great-great-great-granddaughter"
@[email protected] "great-great-great-great-granduncle great-great-great-great-grandaunt"
@[email protected] "great-great-great-great-granduncle great-great-great-great-grandauntie"
@[email protected] "great-great-great-great-great-granddad great-great-great-great-great-grandmom"
@[email protected] "great-great-great-great-great-grandfather great-great-great-great-great-grandmother"
@[email protected] "great-great-great-great-great-grandnephew great-great-great-great-great-grandniece"
@[email protected] "great-great-great-great-great-grandpa great-great-great-great-great-grandma"
@[email protected] "great-great-great-great-great-grandpapa great-great-great-great-great-grandmama"
@[email protected] "great-great-great-great-great-grandpop great-great-great-great-great-grandmom"
@[email protected] "great-great-great-great-great-grandson great-great-great-great-great-granddaughter"
@[email protected] "great-great-great-great-great-granduncle great-great-great-great-great-grandaunt"
@[email protected] "great-great-great-great-great-granduncle great-great-great-great-great-grandauntie"
@[email protected] "great-great-great-great-great-uncle great-great-great-great-great-grandaunt"
@[email protected] "great-great-great-great-great-uncle great-great-great-great-great-grandauntie"
@[email protected] "great-great-great-great-uncle great-great-great-great-grandaunt"
@[email protected] "great-great-great-great-uncle great-great-great-great-grandauntie"
@[email protected] "great-great-great-uncle great-great-great-grandaunt"
@[email protected] "great-great-great-uncle great-great-great-grandauntie"
@[email protected] "great-great-uncle great-great-grandaunt"
@[email protected] "great-great-uncle great-great-grandauntie"
@[email protected] "great-uncle great-grandaunt"
@[email protected] "great-uncle great-grandauntie"
@[email protected] "gringo gringa"
@[email protected] "groom bride"
@[email protected] "groomsboy groomsgirl groomsman groomswoman groomsmen groomswomen"
@[email protected] "groundsboy groundsgirl groundsman groundswoman groundsmen groundswomen"
@[email protected] "gunboy gungirl gunman gunwoman gunmen gunwomen"
@[email protected] "guy gal"
@[email protected] "hackboy hackgirl hackman hackwoman hackmen hackwomen"
@[email protected] "hammerboy hammergirl hammerman hammerwoman hammermen hammerwomen"
@[email protected] "handcraftsboy handcraftsgirl"
@[email protected] "handcraftsman handcraftswoman handcraftsmen handcraftswomen"
@[email protected] "handi-craftsboy handi-craftsgirl"
@[email protected] "handi-craftsman handi-craftswoman handi-craftsmen handi-craftswomen"
@[email protected] "hangboy hanggirl hangman hangwoman hangmen hangwomen"
@[email protected] "hardboy hardgirl hardman hardwoman hardmen hardwomen"
@[email protected] "hatchetboy hatchetgirl hatchetman hatchetwoman hatchetmen hatchetwomen"
@[email protected] "he she him her himself herself his hers his her"
@[email protected] "he-boy he-girl he-man he-woman he-men he-women"
@[email protected] "headmaster headmistress"
@[email protected] "heir heiress"
@[email protected] "helboy helgirl helman helwoman helmen helwomen"
@[email protected] "helmsman helmswoman helmsmen helmswomen"
@[email protected] "herdboy herdgirl herdman herdwoman herdmen herdwoman"
@[email protected] "heritor heritress heritor heritrix"
@[email protected] "hero heroine"
@[email protected] "highwayboy highwaygirl highwayman highwaywoman highwaymen highwaywomen"
@[email protected] "hillsboy hillsgirl hillsman hillswoman hillsmen hillswomen"
@[email protected] "hob jill"
@[email protected] "horseboy horsegirl horseman horsewoman horsemen horsewomen"
@[email protected] "host hostess"
@[email protected] "hunter huntress"
@[email protected] "husband wife husbands wives"
@[email protected] "hypeboy hypegirl hypeman hypewoman hypemen hypewomen"
@[email protected] "iceboy icegirl iceman icewoman icemen icewomen"
@[email protected] "incubii sucubii incubus succubus"
@[email protected] "inheritor inheritress inheritor inheritrix"
@[email protected] "instructor instructress"
@[email protected] "irishboy irishgirl irishman irishwoman irishmen irishwomen"
@[email protected] "ironboy irongirl ironman ironwoman ironmen ironwomen"
@[email protected] "jackaroo jillaroo jack jill"
@[email protected] "jew jewess"
@[email protected] "jointer jointress"
@[email protected] "khaliph khalafia khaliph khalipha"
@[email protected] "king queen"
@[email protected] "king-hit queen-hit"
@[email protected] "king-of-arms queen-of-arms"
@[email protected] "kingcraft queencraft"
@[email protected] "kingcup queencup"
@[email protected] "kingdom queendom"
@[email protected] "kingdomful queendomful kingdomless queendomless kingdomship queendomship"
@[email protected] "kinged queened"
@[email protected] "kinger queener"
@[email protected] "kingest queenest"
@[email protected] "kinghead queenhead"
@[email protected] "kinghood queenhood"
@[email protected] "kinging queening"
@[email protected] "kingless queenless kinglessness queenlessness"
@[email protected] "kinglier queenlier kingliest queenliest"
@[email protected] "kinglihood queenlihood"
@[email protected] "kinglike queenlike kingliker queenliker kinglikest queenlikest"
@[email protected] "kingliness queenliness"
@[email protected] "kingling queenling kingling queenling kingly queenly"
@[email protected] "kingmaker queenmaker kingmaking queenmaking"
@[email protected] "kingpiece queenpiece"
@[email protected] "kingpin queenpin kingpost queenpost"
@[email protected] "kingsboy kingsgirl kingsman kingswoman kingsmen kingswomen"
@[email protected] "kingship queenship"
@[email protected] "kingside queenside"
@[email protected] "kingsize queensize"
@[email protected] "kingsman queensman kingsmen queensmen"
@[email protected] "klansboy klansgirl klansman klanswoman klansmen klanswomen"
@[email protected] "kinglier queenlier kingliest queenliest"
@[email protected] "kinglihood queenlihood"
@[email protected] "kinglike queenlike kingliker queenliker kinglikest queenlikest"
@[email protected] "kingliness queenliness"
@[email protected] "kingling queenling kingling queenling kingly queenly"
@[email protected] "kingmaker queenmaker kingmaking queenmaking"
@[email protected] "kingpiece queenpiece"
@[email protected] "kingpin queenpin kingpost queenpost"
@[email protected] "kingsboy kingsgirl kingsman kingswoman kingsmen kingswomen"
@[email protected] "kingship queenship"
@[email protected] "kingside queenside"
@[email protected] "kingsize queensize"
@[email protected] "kingsman queensman kingsmen queensmen"
@[email protected] "klansboy klansgirl klansman klanswoman klansmen klanswomen"
@[email protected] "knight dame"
@[email protected] "lad lass laddie lassie"
@[email protected] "landgrave landgravine"
@[email protected] "landlord landlady landlords handladies"
@[email protected] "latino latina"
@[email protected] "launderer laundress"
@[email protected] "laundryboy laundrygirl laundryman laundrywoman laundrymen laundrywomen"
@[email protected] "lawboy lawgirl lawman lawwoman lawmen lawwomen"
@[email protected] "lawyer layeress"
@[email protected] "layboy laygirl layman laywoman laymen laywomen"
@[email protected] "leatherboy leathergirl leatherman leatherwoman leathermen leatherwomen"
@[email protected] "legboy leggirl legman legwoman legmen legwomen"
@[email protected] "liegeboy liegegirl liegeman liegewoman liegemen liegewomen"
@[email protected] "lineboy linegirl lineman linewoman linemen linewomen"
@[email protected] "linesboy linesgirl linesman lineswoman linesmen lineswomen"
@[email protected] "linkboy linkgirl linkman linkwoman linkmen linkwomen"
@[email protected] "lion lioness"
@[email protected] "lizardboy lizardgirl lizardman lizardwoman lizardmen lizardwomen"
@[email protected] "lord lady lords ladies"
@[email protected] "madboy madgirl madman madwoman madmen madwomen"
@[email protected] "mailboy mailgirl mailman mailwoman mailmen mailwomen"
@[email protected] "male female maleness femaleness"
@[email protected] "man woman men women"
@[email protected] "man-boy girl-worman"
@[email protected] "man-children woman-children manchildren womanchildren"
@[email protected] "manager manageress"
@[email protected] "manhood womenhood"
@[email protected] "manly womanly"
@[email protected] "manservant maidservant"
@[email protected] "margrave margavine"
@[email protected] "marquess marquis marquise marchioness"
@[email protected] "masculine feminine"
@[email protected] "masseue masseuse"
@[email protected] "mastboy mastgirl"
@[email protected] "mastman mastwoman mastmen mastwomen"
@[email protected] "maybe-boy maybe-girl maybe-man maybe-woman maybe-men maybe-women"
@[email protected] "mayor mayoress"
@[email protected] "mediator mediatress mediator mediatrix mediator mediatrice"
@[email protected] "men-children women-children menchildren womenchildren"
@[email protected] "merboy mergirl merman mermaid merman merwoman mermen merwomen"
@[email protected] "middleboy middlegirl middleman middlewoman middlemen middlewomen"
@[email protected] "midshipboy midshipgirl midshipman midshipwoman midshipmen midshipwomen"
@[email protected] "milkboy milkgirl milkman milkwoman milkmen milkwomen"
@[email protected] "millionaire millionairess billionaire billionairess"
@[email protected] "misandry misogyny misandrist misogynist"
@[email protected] "moneyboy moneygirl moneyman moneywoman moneymen moneywomen"
@[email protected] "monk nun"
@[email protected] "monster monsteress"
@[email protected] "moor morisco"
@[email protected] "mr mrs mister missus mr ms mr mz master miss master mistress"
@[email protected] "murderer murderess"
@[email protected] "muscleboy musclegirl muscleman musclewoman musclemen musclewomen"
@[email protected] "negroe negress negro negress"
@[email protected] "nephew niece"
@[email protected] "newsboy newsgirl newsman newswoman newsmen newswomen"
@[email protected] "newspaperboy newspapergirl newspaperman newspaperwoman newspapermen newspaperwomen"
@[email protected] "no-boy no-girl no-man no-woman no-men no-women"
@[email protected] "nobelman noblewoman nobelmen nobelwomen"
@[email protected] "nurseryboy nurserygirl nurseryman nurserywoman nurserymen nurserywomen"
@[email protected] "orator oratress orator oratrix"
@[email protected] "orchardboy orchardgirl orchardman orchardwoman orchardmen orchardwomen"
@[email protected] "overboy overgirl overman overwoman overmen overwomen"
@[email protected] "pa ma papa mama pop mom poppy mommy"
@[email protected] "paceboy pacegirl paceman pacewoman pacemen pacewomen"
@[email protected] "paternal maternal patriarchal matriarchal"
@[email protected] "patricide matricide"
@[email protected] "patrolboy patrolgirl patrolman patrolwoman patrolmen patrolwomen"
@[email protected] "patron patroness"
@[email protected] "peacock peahen"
@[email protected] "pitboy pitgirl pitman pitwoman pitmen pitwomen"
@[email protected] "pitchboy pitchgirl pitchman pitchwoman pitchmen pitchwomen"
@[email protected] "plowman plowwoman plowmen plowwomen"
@[email protected] "poet poetess"
@[email protected] "policeboy policegirl policeman policewoman policemen policewomen"
@[email protected] "poultryboy poultrygirl poultryman poultrywoman poultrymen poultrywomen"
@[email protected] "preacher preacheress"
@[email protected] "priest priestess"
@[email protected] "prince princess"
@[email protected] "prior prioress"
@[email protected] "prophet prophetess"
@[email protected] "proprietor proprietress"
@[email protected] "protor protectress"
@[email protected] "ragboy raggirl ragman ragwoman ragmen ragwomen"
@[email protected] "railroadboy railroadgirl railroadman railroadwoman railroadmen railroadwomen"
@[email protected] "railwayboy railwaygirl railwayman railwaywoman railwaymen railwaywomen"
@[email protected] "rainboy raingirl rainman rainwoman rainmen rainwomen"
@[email protected] "ram ewe billy ewe"
@[email protected] "rastaboy rastagirl rastaman rastawoman rastamen rastawomen"
@[email protected] "remainder-boy remainder-girl"
@[email protected] "remainder-man remainder-woman remainder-men remainder-women"
@[email protected] "remainderboy remaindergirl remainderman remainderwoman remaindermen remainderwomen"
@[email protected] "repoboy repogirl repoman repowoman repomen repowomen"
@[email protected] "rescueboy rescuegirl rescueman rescuewoman rescuemen rescuewomen"
@[email protected] "ringboy ringgirl ringman ringwoman ringmen ringwomen"
@[email protected] "schoolmaster schoolmistress"
@[email protected] "scotsboy scotsgirl scotsman scotswoman scotsmen scotswomen"
@[email protected] "sculptor sculptress"
@[email protected] "seaboy seagirl seaman seawoman seamen seawomen"
@[email protected] "seducer seduceress"
@[email protected] "seductor seductress"
@[email protected] "seedsboy seedsgirl seedsman seedswoman seedsmen seedswomen"
@[email protected] "sempster sempstress"
@[email protected] "senor senora"
@[email protected] "serviceboy servicegirl serviceman servicewoman servicemen servicewomen"
@[email protected] "sewerboy sewergirl sewerman sewerwoman sewermen sewerwomen"
@[email protected] "shaboy shagirl shaman shawoman shamen shawomen"
@[email protected] "sheepboy sheepgirl sheepman sheepwoman sheepmen sheepwomen"
@[email protected] "shellfisherboy shellfishergirl"
@[email protected] "shellfisherman shellfisherwoman shellfishermen shellfisherwomen"
@[email protected] "shepherd shepherdess"
@[email protected] "shirt blouse"
@[email protected] "shopboy shopgirl shopman shopwoman shopmen shopwomen"
@[email protected] "showboy showgirl showman showwoman showmen showwomen"
@[email protected] "silkboy silkgirl silkman silkwoman silkmen silkwomen"
@[email protected] "singer singeress"
@[email protected] "sir madam sir ma'am sir damn"
@[email protected] "sire dam"
@[email protected] "snowboy snowgirl snowman snowwoman snowmen snowwomen"
@[email protected] "son daughter"
@[email protected] "songster songstress"
@[email protected] "sorcerer sorceress"
@[email protected] "spokesboy spokesgirl spokesman spokeswoman spokesmen spokeswomen"
@[email protected] "sportsboy sportsgirl sportsman sportswoman sportsmen sportswomen"
@[email protected] "stag hind"
@[email protected] "stallion mare"
@[email protected] "statesboy statesgirl statesman stateswoman statesmen stateswomen"
@[email protected] "steer heifer"
@[email protected] "steersboy steersgirl steersman steerswoman steersmen steerswomen"
@[email protected] "stepdad stepmom stepfather stepmother stepson stepdaughter"
@[email protected] "steward stewardess"
@[email protected] "stuntboy stuntgirl stuntman stuntwoman stuntmen stuntwomen"
@[email protected] "suitor suitress"
@[email protected] "sultan sultana"
@[email protected] "sweat glow"
@[email protected] "tailor seamstress"
@[email protected] "talesboy talesgirl talesman taleswoman talesmen taleswomen"
@[email protected] "talisboy talisgirl talisman taliswoman talismen taliswomen"
@[email protected] "taskmaster taskmistress"
@[email protected] "temptor temptress"
@[email protected] "terminator terminatrix"
@[email protected] "tiger tigress"
@[email protected] "toastmaster toastmistress"
@[email protected] "tod vixen"
@[email protected] "tom hen"
@[email protected] "townsboy townsgirl townsman townswoman townsmen townswomen"
@[email protected] "toyboy toygirl toyman toywoman toymen toywomen"
@[email protected] "tradesboy tradesgirl tradesman tradeswoman tradesmen tradeswomen"
@[email protected] "traitor traitress"
@[email protected] "trencherboy trenchergirl trencherman trencherwoman trenchermen trencherwomen"
@[email protected] "triggerboy triggergirl triggerman triggerwoman triggermen triggerwomen"
@[email protected] "tutor tutoress"
@[email protected] "tzar tzarina"
@[email protected] "uncle aunt uncle auntie"
@[email protected] "undies knickers"
@[email protected] "usher usherette"
@[email protected] "utilityboy utilitygirl utilityman utilitywoman utilitymen utilitywomen"
@[email protected] "vampire vampiress"
@[email protected] "victor victress"
@[email protected] "villian villainess"
@[email protected] "viscount viscountess viscount visereine"
@[email protected] "vixor vixen"
@[email protected] "votary votaress votary votress votaries votresses"
@[email protected] "wageboy wagegirl wageman wagewoman wagemen wagewomen"
@[email protected] "waiter waitress"
@[email protected] "warder wardess"
@[email protected] "warrior warrioress warlock witch"
@[email protected] "washerboy washergirl washerman washerwoman washermen washerwomen"
@[email protected] "watchboy watchgirl watchman watchwoman watchmen watchwomen"
@[email protected] "waterboy watergirl waterman waterwoman watermen waterwomen"
@[email protected] "weighboy weighgirl weighman weighwoman weighmen weighwomen"
@[email protected] "werewolf wifwolf"
@[email protected] "whaleboy whalegirl whaleman whalewoman whalemen whalewomen"
@[email protected] "wheelboy wheelgirl wheelman wheelwoman wheelmen wheelwomen"
@[email protected] "whoremonger whoremistress"
@[email protected] "widower widow"
@[email protected] "wingboy winggirl wingman wingwoman wingmen wingwomen"
@[email protected] "wiseboy wisegirl wiseman wisewoman wisemen wisewomen"
@[email protected] "wizard witch"
@[email protected] "workboy workgirl workman workwoman workmen workwomen"
@[email protected] "workingboy workinggirl workingman workingwoman workingmen workingwomen"
@[email protected] "yachtsboy yachtsgirl yachtsman yachtswoman yachtsmen yachtswomen"
@[email protected] "yardboy yardgirl yardman yardwoman yardmen yardwomen"
@[email protected] "yes-boy yes-girl yes-man yes-woman yes-men yes-women"
/*"first" names; not a complete list. */
@[email protected] "Aaron Erin Adam Eve Adrian Adriana Aidrian Aidriana Alan Alaina Albert Alberta Alex"
@[email protected] "Alexa Alex Alexis Alexander Alaxandra Alexander Alexandra Alexander Alexis"
@[email protected] "Alexandra Alexander Alexei Alexis Alfred Alfreda Andrew Andrea Angel Angelica"
@[email protected] "Anthony Antonia Antoine Antoinette Ariel Arielle Ashleigh Ashley Barry Barrie"
@[email protected] "Benedict Benita Benjamin Benjamine Bert Bertha Brandon Brandi Brendan Brenda Brian"
@[email protected] "Rianne Briana Brian Caela Caesi Caeleb Caeli Carl Carla Carl Carly Carolus Caroline"
@[email protected] "Charles Caroline Charles Charlotte Christian Christa Christian Christiana Christian"
@[email protected] "Christina Christopher Christina Christopher Christine Clarence Claire Claude"
@[email protected] "Claudia Clement Clementine Cory Cora Daniel Daniella Daniel Danielle David Davena"
@[email protected] "David Davida David Davina Dean Deanna Devin Devina Edward Edwina Edwin Edwina Emil"
@[email protected] "Emilie Emil Emily Eric Erica Erick Erica Erick Ericka Ernest Ernestine Ethan Etha"
@[email protected] "Ethan Ethel Eugene Eugenie Fabian Fabia Frances Francesca Francesco Francesca"
@[email protected] "Francis Frances Francis Francine Fred Freda Frederick Fredrica Fredrick Frederica"
@[email protected] "Gabriel Gabriella Gabriel Gabrielle Gene Jean George Georgia George Georgina Gerald"
@[email protected] "Geraldine Gerard Gerardette Giovanni Giovanna Glen Glenn Harry Harriet Harry"
@[email protected] "Harriette Heather Heath Henry Henrietta Horace Horatia Ian Iana Ilija Ilinka Ivan"
@[email protected] "Ivy Ivo Ivy Jack Jackelyn Jack Jackie Jack Jaclyn Jack Jacqueline Jacob Jacobine"
@[email protected] "James Jamesina James Jamie Jaun Jaunita Jayda Jayden Jesse Jessica Jesse Jessie Joe"
@[email protected] "Johanna Joel Joelle John Jean John Joan John Johanna Joleen Joseph Jon Joane Joseph"
@[email protected] "Josephine Joseph Josphine Julian Julia Julian Juliana Julian Julianna Justin"
@[email protected] "Justine Karl Karly Ken Kendra Kendrick Kendra Kian Kiana Kyle Kylie Laurence Laura"
@[email protected] "Laurence Lauren Laurence Laurencia Leigh Leigha Leon Leona Louis Louise Lucas Lucia"
@[email protected] "Lucian Lucy Luke Lucia Lyle Lyla Maria Mario Mario Maricela Mark Marcia Marshall"
@[email protected] "Marsha Martin Martina Martin Martine Max Maxine Michael Michaela Michael Micheala"
@[email protected] "Michael Michelle Mitchell Michelle Nadir Nadira Nicholas Nicki Nicholas Nicole"
@[email protected] "Nicky Nikki Nicolas Nicole Nigel Nigella Noel Noelle Oen Ioena Oliver Olivia"
@[email protected] "Patrick Patricia Paul Paula Phillip Phillipa Phillip Pippa Quintin Quintina"
@[email protected] "Reginald Regina Richard Richardine Robert Roberta Robert Robyn Ronald Rhonda Ryan"
@[email protected] "Rhian Ryan Ryanne Samantha Samuel Samuel Samantha Samuel Sammantha Samuel Samuela"
@[email protected] "Sean Sian Sean Siana Shaun Shauna Sheldon Shelby Sonny Sunny Stephan Stephanie"
@[email protected] "Stephen Stephanie Steven Stephanie Terry Carol Terry Carrol Theodore Theadora"
@[email protected] "Theodore Theodora Theodore Theordora Thomas Thomasina Tristan Tricia Tristen Tricia"
@[email protected] "Ulric Ulrika Valentin Valentina Victor Victoria William Wilhelmina William Willa"
@[email protected] "William Willamina Xavier Xaviera Yarden Yardena Zahi Zahira Zion Ziona"
 
say center(" There're " words(@) ' words in the gender bender list. ', sw, '─')
 
do j=1 to words(@) by 2; n=j+1
m =word(@,j); f =word(@,n); @.m=m  ;  !.m=f  ; @.f =f  ;  !.f =m
ms =many(m)  ; fs =many(f)  ; @.ms=ms  ;  !.ms=fs  ; @.fs =fs ;  !.fs =ms
mp =proper(m); fp =proper(f); @.mp=mp  ;  !.mp=fp  ; @.fp =fp ;  !.fp =mp
mps=many(mp) ; fps=many(fp) ; @.mps=mps;  !.mps=fps; @.fps=fps;  !.fps=mps
upper m f  ; @.m=m  ;  !.m=f  ; @.f =f  ;  !.f =m
ms =many(m)  ; fs =many(f)  ; @.ms=ms  ;  !.ms=fs  ; @.fs =fs ;  !.fs =ms
end /*j*/
/* [↑] handle lower/uppercase, capitalized, and plurals.*/
new=
do k=1 for words(old)
new=new bendit( word(old,k) ) /*construct a list of "gender" words.*/
end /*k*/
say
call tell new, ' new ' /*show a nicely parsed "new" text. */
exit /*stick a fork in it, we're all done. */
/*──────────────────────────────────────────────────────────────────────────────────────*/
bendit: parse arg x 1 ox /*get a word, make a copy of original.*/
if length(x)==1 then return ox /*if one character, then return as is. */
@abc= 'abcdefghijklmnopqrstuvwxyz' /*define a lowercase (Latin) alphabet. */
parse upper var @abc @abcU pref suff /*get uppercase version, nullify vars.*/
@[email protected] || @abcU /*construct lower & uppercase alpahbet.*/
_=verify(x, @abcU, 'M') /*see if all the "letters" are letters.*/
if _==0 then return ox /*No? Then return it as is; not a word*/
pref=left(x, _ - 1) /*obtain (any, if at all) prefix. */
x=substr(x, _) /*obtain the suffix (any, if at all). */
xr=reverse(x) /*reverse the string (for testing caps)*/
_=verify(xr, @abcU, 'M')
if _\==0 then do; suff=reverse( left(xr, _ - 1) )
xr=substr(xr, _)
end
x=reverse(xr)
if \datatype(x, 'M') then return x /*Not all letters? Then return original*/
if @.x\=='' then return pref || !.x || suff /*plurized ? */
if !.x\=='' then return pref || @.x || suff /*has a gender ? */
return pref || x || suff /*No? Return as is.*/
/*──────────────────────────────────────────────────────────────────────────────────────*/
many: parse arg _; if right(_, 1)=='s' then return _ || 'es' /*maintain lower. */
if right(_, 1)=='S' then return _ || 'ES' /* " upper. */
if datatype(_,'U') then return _'S' /*use uppercase? */
return _'s' /* " lowercase. */
/*──────────────────────────────────────────────────────────────────────────────────────*/
proper: arg L1 2; parse arg 2 _2; return L1 || _2
/*──────────────────────────────────────────────────────────────────────────────────────*/
tell: procedure expose sw; parse arg z; z=space(z); $=
say center( arg(2), sw, '─')
do until z==''; parse var z x z; n=$ x
if length(n)<sw then do; $=n; iterate; end
say strip($)
$=x
end /*until*/
if $\='' then say strip($)
say
return

This REXX program makes use of   LINESIZE   REXX program (or BIF) which is used to determine the screen width (or linesize) of the terminal (console).
The   LINESIZE.REX   REXX program is included here   ──►   LINESIZE.REX.

output   when using the input of:   She was a soul stripper. She took my heart!
───────────────────────────────────────────── old ─────────────────────────────────────────────
She was a soul stripper. She took my heart!

────────────────────── There're  2776  words in the gender bender list. ───────────────────────

───────────────────────────────────────────── new ─────────────────────────────────────────────
He was a soul stripper. He took my heart!
output   when using the default input:
───────────────────────────────────── old ─────────────────────────────────────
When a new-hatched savage running wild about his native woodlands in a grass
clout, followed by the nibbling goats, as if he were a green sapling; even
then, in Queequegs ambitious soul, lurked a strong desire to see something
more of Christendom than a specimen whaler or two. His father was a High
Chief, a King; his uncle a High Priest; and on the maternal side he boasted
aunts who were the wives of unconquerable warriors. There was excellent blood
in his veins-royal stuff; though sadly vitiated, I fear, by the cannibal
propensity he nourished in his untutored youth.

────────────── There're  2776  words in the gender bender list. ───────────────

───────────────────────────────────── new ─────────────────────────────────────
When a new-hatched savage running wild about her native woodlands in a grass
clout, followed by the nibbling goats, as if she were a green sapling; even
then, in Queequegs ambitious soul, lurked a strong desire to see something
more of Christendom than a specimen whaler or two. Her mother was a High
Chiefess, a Queen; her auntie a High Priestess; and on the paternal side she
boasted uncles who were the husbands of unconquerable warrioresses. There was
excellent blood in her veins-royal stuff; though sadly vitiated, I fear, by
the cannibal propensity she nourished in her untutored youth.

Ring[edit]

 
# Project : Reverse the gender of a string
# Date  : 2017/10/05
# Author : Gal Zsolt (~ CalmoSoft ~)
# Email  : <[email protected]>
 
revGender = list(4)
word = ["She", "she", "Her", "her", "hers", "He", "he", "His", "his", "him"]
repl = ["He", "he", "His", "his" ,"his", "She", "she", "Her", "her", "her"]
 
revGender[1] = "She was a soul stripper. She took his heart!"
revGender[2] = "He was a soul stripper. He took her heart!"
revGender[3] = "She wants what's hers, he wants her and she wants him!"
revGender[4] = "Her dog belongs to him but his dog is hers!"
 
for p=1 to 4
gstr = ""
see revGender[p] + " ->" + nl
gend = repl(revGender[p])
for nr=1 to len(gend)
if nr = len(gend)
gstr = gstr + gend[nr]
else
gstr = gstr + gend[nr] + " "
ok
next
gstr = trim(gstr)
gstr = left(gstr, len(gstr) - 2)
if right(gstr, 1) != "!"
gstr = gstr + "!"
ok
see gstr + nl + nl
next
 
func repl(cStr)
cStr = words(cStr) + nl
for n=1 to len(cStr)
flag = 0
for m=1 to len(word)
if right(cStr[n],1) = ","
cStr[n] = left(cStr[n], len(cStr[n]) - 1)
flag = 1
ok
if right(cStr[n],1) = "!"
cStr[n] = left(cStr[n], len(cStr[n]) - 1)
flag = 2
ok
if cStr[n] = word[m]
if flag = 0
cStr[n] = repl[m]
ok
if flag = 1
cStr[n] = repl[m] + ","
ok
if flag = 2
cStr[n] = repl[m] + "!"
ok
exit
ok
next
next
return cStr
 
 
func words(cStr2)
aList = str2list(cStr2)
for x in aList
x2 = substr(x," ",nl)
alist2 = str2list(x2)
next
return alist2
 

Output:

She was a soul stripper. She took his heart! ->
He was a soul stripper. He took her heart!

He was a soul stripper. He took her heart! ->
She was a soul stripper. She took his heart!

She wants what's hers, he wants her and she wants him! ->
He wants what's his, she wants his and he wants her!

Her dog belongs to him but his dog is hers! ->
His dog belongs to her but her dog is his!

Sidef[edit]

var male2female = <<'EOD'
maleS femaleS, maleness femaleness, him her, himself herself, his her, his
hers, he she, Mr Mrs, Mister Missus, Ms Mr, Master Miss, MasterS MistressES,
uncleS auntS, nephewS nieceS, sonS daughterS, grandsonS granddaughterS,
brotherS sisterS, man woman, men women, boyS girlS, paternal maternal,
grandfatherS grandmotherS, GodfatherS GodmotherS, GodsonS GoddaughterS,
fiancéS fiancéeS, husband wife, husbands wives, fatherS motherS, bachelorS
spinsterS, bridegroomS brideS, widowerS widowS, KnightS DameS, Sir DameS,
KingS QueenS, DukeS DuchessES, PrinceS PrincessES, Lord Lady, Lords Ladies,
MarquessES MarchionessES, EarlS CountessES, ViscountS ViscountessES, ladS
lassES, sir madam, gentleman lady, gentlemen ladies, BaronS BaronessES,
stallionS mareS, ramS eweS, coltS fillieS, billy nanny, billies nannies,
bullS cowS, godS goddessES, heroS heroineS, shirtS blouseS, undies nickers,
sweat glow, jackarooS jillarooS, gigoloS hookerS, landlord landlady,
landlords landladies, manservantS maidservantS, actorS actressES, CountS
CountessES, EmperorS EmpressES, giantS giantessES, heirS heiressES, hostS
hostessES, lionS lionessES, managerS manageressES, murdererS murderessES,
priestS priestessES, poetS poetessES, shepherdS shepherdessES, stewardS
stewardessES, tigerS tigressES, waiterS waitressES, cockS henS, dogS bitchES,
drakeS henS, dogS vixenS, tomS tibS, boarS sowS, buckS roeS, peacockS
peahenS, gander goose, ganders geese, friarS nunS, monkS nunS
EOD
 
var m2f = male2female.split(/,\s*/).map { |tok| tok.words}
 
var re_plural = /E?S\z/
var re_ES = /ES\z/
 
func gen_pluralize(m, f) {
[
[m - re_plural, f - re_plural],
[m.sub(re_ES, 'es'), f.sub(re_ES, 'es')],
[m.sub(re_plural, 's'), f.sub(re_plural, 's')],
]
}
 
var dict = Hash()
 
for m,f in m2f {
for x,y in gen_pluralize(m, f).map{.map{.lc}} {
if (x ~~ dict) {
dict{y} = x
} else {
dict{x, y} = (y, x)
}
}
}
 
var gen_re = Regex.new('\b(' + dict.keys.join('|') + ')\b', 'i')
 
func copy_case(orig, repl) {
var a = orig.chars
var b = repl.chars
 
var uc = 0
var min = [a, b].map{.len}.min
for i in ^min {
if (a[i] ~~ /^[[:upper:]]/) {
b[i].uc!
++uc
}
}
 
uc == min ? repl.uc : b.join('')
}
 
func reverse_gender(text) {
text.gsub(gen_re, { |a| copy_case(a, dict{a.lc}) })
}

Example:

say reverse_gender("She was a soul stripper. She took my heart!");
Output:
He was a soul stripper. He took my heart!

Tcl[edit]

# Construct the mapping variables from the source mapping
apply {{} {
global genderMap genderRE
# The mapping is from the Python solution, though omitting the names
# for the sake of a bit of brevity...
foreach {maleTerm femaleTerm} {
maleS femaleS maleness femaleness
him her himself herself his hers his her he she
Mr Mrs Mister Missus Ms Mr Master Miss Master Mistress
uncleS auntS nephewS nieceS sonS daughterS grandsonS granddaughterS
brotherS sisterS man woman men women boyS girlS paternal maternal
grandfatherS grandmotherS GodfatherS GodmotherS GodsonS GoddaughterS
fiancéS fiancéeS husband wife husbands wives fatherS motherS
bachelorS spinsterS bridegroomS brideS widowerS widowS
KnightS DameS Sir DameS KingS QueenS DukeS DuchessES
PrinceS PrincessES Lord Lady Lords Ladies MarquessES MarchionessES
EarlS CountessES ViscountS ViscountessES ladS lassES sir madam
gentleman lady gentlemen ladies BaronS BaronessES
stallionS mareS ramS eweS coltS fillieS billy nanny billies nannies
bullS cowS godS goddessES heroS heroineS shirtS blouseS undies nickers
sweat glow jackarooS jillarooS gigoloS hookerS landlord landlady
landlords landladies manservantS maidservantS actorS actressES
CountS CountessES EmperorS EmpressES giantS giantessES heirS heiressES
hostS hostessES lionS lionessES managerS manageressES
murdererS murderessES priestS priestessES poetS poetessES
shepherdS shepherdessES stewardS stewardessES tigerS tigressES
waiterS waitressES cockS henS dogS bitchES drakeS henS dogS vixenS
tomS tibS boarS sowS buckS roeS peacockS peahenS
gander goose ganders geese friarS nunS monkS nunS
} {
foreach {m f} [list \
$maleTerm $femaleTerm \
[regsub {E*S$} $maleTerm ""] [regsub {E*S$} $femaleTerm ""]
] {
dict set genderMap [string tolower $m] [string tolower $f]
dict set genderMap [string toupper $m] [string toupper $f]
dict set genderMap [string totitle $m] [string totitle $f]
dict set genderMap [string tolower $f] [string tolower $m]
dict set genderMap [string toupper $f] [string toupper $m]
dict set genderMap [string totitle $f] [string totitle $m]
}
}
# Now the RE, which matches any key in the map *as a word*
set genderRE "\\m(?:[join [dict keys $genderMap] |])\\M"
}}
 
proc reverseGender {string} {
global genderRE genderMap
# Used to disable Tcl's metacharacters for [subst]
set safetyMap {\\ \\\\ \[ \\\[ \] \\\] $ \\$}
subst [regsub -all $genderRE [string map $safetyMap $string] {[
string map $genderMap &
]}]
}

Demonstrating:

puts [reverseGender "She was a soul stripper. She took my heart!"]\n
puts [reverseGender "When a new-hatched savage running wild about his native
woodlands in a grass clout, followed by the nibbling goats, as if
he were a green sapling; even then, in Queequeg's ambitious soul,
lurked a strong desire to see something more of Christendom than
a specimen whaler or two. His father was a High Chief, a King;
his uncle a High Priest; and on the maternal side he boasted aunts
who were the wives of unconquerable warriors. There was excellent
blood in his veins-royal stuff; though sadly vitiated, I fear,
by the cannibal propensity he nourished in his untutored youth."
]
Output:
He was a soul stripper. He took my heart!

When a new-hatched savage running wild about her native
woodlands in a grass clout, followed by the nibbling goats, as if
she were a green sapling; even then, in Queequeg's ambitious soul,
lurked a strong desire to see something more of Christendom than
a specimen whaler or two. Her mother was a High Chief, a Queen;
her aunt a High Priestess; and on the paternal side she boasted uncles
who were the husbands of unconquerable warriors. There was excellent
blood in her veins-royal stuff; though sadly vitiated, I fear,
by the cannibal propensity she nourished in her untutored youth.

Go[edit]

 
package main
 
import "fmt"
import "strings"
func main() {
s := "She was a soul stripper. She took my heart!"
fmt.Println(s)
 
if strings.Contains(s, "She") {
y:= strings.Replace(s, "She ", " He ", -1)
fmt.Println(y)
}else if strings.Contains(s, "He") {
y:= strings.Replace(s, "He ", " She ", -1)
fmt.Println(y)
}
}
 
Output:
She was a  soul stripper. She took  my heart!
 He was a  soul stripper.  He took  my heart!