Reverse the gender of a string: Difference between revisions

m
m (→‎{{header|REXX}}: added a bunch of king/queen words. -- ~~~~)
m (→‎{{header|Wren}}: Minor tidy)
 
(68 intermediate revisions by 22 users not shown)
Line 1:
{{draft task|String manipulation}}
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.
 
The task is to create a function that reverses the gender of the text of a string.
<lang pseudocode>print rev_gender("She was a soul stripper. She took my heart!")
 
He was a soul stripper. He took my heart!</lang>
The function should take one arguments being a string to undergo the gender change.
 
The returned string should contain this initial string, with all references to be gender switched.
 
<syntaxhighlight lang="pseudocode">print rev_gender("She was a soul stripper. She took my heart!")
He was a soul stripper. He took my heart!</syntaxhighlight>
 
 
{{Template:Strings}}
<br><br>
 
=={{header|11l}}==
{{trans|Kotlin}}
 
<syntaxhighlight lang="11l">F reverse_gender(=s)
V words = [‘She’, ‘she’, ‘Her’, ‘her’, ‘hers’, ‘He’, ‘he’, ‘His’, ‘his’, ‘him’]
V repls = [‘He_’, ‘he_’, ‘His_’, ‘his_’, ‘his_’, ‘She_’, ‘she_’, ‘Her_’, ‘her_’, ‘her_’]
 
L(word, repl) zip(words, repls)
s = s.replace(re:(‘\b’word‘\b’), repl)
 
R s.replace(‘_’, ‘’)
 
print(reverse_gender(‘She was a soul stripper. She took his heart!’))
print(reverse_gender(‘He was a soul stripper. He took her heart!’))
print(reverse_gender(‘She wants what's hers, he wants her and she wants him!’))
print(reverse_gender(‘Her dog belongs to him but his dog is hers!’))</syntaxhighlight>
 
{{out}}
<pre>
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!
</pre>
 
=={{header|Action!}}==
<syntaxhighlight lang="action!">DEFINE PTR="CARD"
DEFINE COUNT="10"
PTR ARRAY words(COUNT)
PTR ARRAY repls(COUNT)
 
PROC Init()
words(0)="She" repls(5)=words(0)
words(1)="she" repls(6)=words(1)
words(2)="Her" repls(7)=words(2)
words(3)="her" repls(8)=words(3)
words(4)="hers" repls(9)=words(4)
words(5)="He" repls(0)=words(5)
words(6)="he" repls(1)=words(6)
words(7)="His" repls(2)=words(7)
words(8)="his" repls(3)=words(8)
words(9)="him" repls(4)=words(9)
RETURN
 
PROC Append(CHAR ARRAY text,suffix)
BYTE POINTER srcPtr,dstPtr
BYTE len
 
len=suffix(0)
IF text(0)+len>255 THEN
len=255-text(0)
FI
IF len THEN
srcPtr=suffix+1
dstPtr=text+text(0)+1
MoveBlock(dstPtr,srcPtr,len)
text(0)==+suffix(0)
FI
RETURN
 
BYTE FUNC IsAlpha(CHAR c)
IF c>='A AND c<='Z OR c>='a AND c<='z THEN
RETURN (1)
FI
RETURN (0)
 
BYTE FUNC NextItem(CHAR ARRAY text BYTE start,word CHAR ARRAY res)
BYTE i
 
i=start
WHILE i<=text(0) AND IsAlpha(text(i))=word
DO i==+1 OD
SCopyS(res,text,start,i-1)
RETURN (i)
 
BYTE FUNC WordIndex(CHAR ARRAY text)
BYTE i
 
FOR i=0 TO COUNT-1
DO
IF SCompare(text,words(i))=0 THEN
RETURN (i)
FI
OD
RETURN (255)
 
PROC ReverseGender(CHAR ARRAY in,out)
CHAR ARRAY s(256)
BYTE start,word,index
 
out(0)=0
start=1 word=1
WHILE start<=in(0)
DO
start=NextItem(in,start,word,s)
index=WordIndex(s)
word=1-word
IF index=255 THEN
Append(out,s)
ELSE
Append(out,repls(index))
FI
OD
RETURN
 
PROC Test(CHAR ARRAY in)
CHAR ARRAY res(256)
 
ReverseGender(in,res)
PrintF("Input: ""%S""%E%E",in)
PrintF("Output: ""%S""%E%E%E",res)
RETURN
 
PROC Main()
Init()
Test("She was a soul stripper. She took his heart!")
Test("She wants what's hers, he wants her and she wants him!")
Test("She, she, Her, her, hers, He, he, His, his, him")
RETURN</syntaxhighlight>
{{out}}
[https://gitlab.com/amarok8bit/action-rosetta-code/-/raw/master/images/Reverse_the_gender_of_a_string.png Screenshot from Atari 8-bit computer]
<pre>
Input: "She was a soul stripper. She took his heart!"
 
Output: "He was a soul stripper. He took her heart!"
 
 
Input: "She wants what's hers, he wants her and she wants him!"
 
Output: "He wants what's him, she wants his and he wants hers!"
 
 
Input: "She, she, Her, her, hers, He, he, His, his, him"
 
Output: "He, he, His, his, him, She, she, Her, her, hers"
</pre>
 
=={{header|Arturo}}==
 
{{trans|Kotlin}}
 
<syntaxhighlight lang="rebol">reverseGender: function [str][
ret: new str
entries: ["She" "she" "Her" "her" "hers" "He" "he" "His" "his" "him"]
repls: ["He_" "he_" "His_" "his_" "his_" "She_" "she_" "Her_" "her_" "her_"]
loop.with:'i entries 'entry ->
replace 'ret to :regex ~{\b|entry|\b} repls\[i]
return replace ret "_" ""
]
print reverseGender "She was a soul stripper. She took his heart!"
print reverseGender "He was a soul stripper. He took her heart!"
print reverseGender "She wants what's hers, he wants her and she wants him!"
print reverseGender "Her dog belongs to him but his dog is hers!"</syntaxhighlight>
 
{{out}}
 
<pre>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!</pre>
 
=={{header|FreeBASIC}}==
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.
<syntaxhighlight lang="freebasic">' 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</syntaxhighlight>
 
{{out}}
<pre>
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!
</pre>
 
=={{header|Go}}==
<syntaxhighlight lang="go">package main
 
import (
"fmt"
"strings"
)
 
func reverseGender(s string) string {
if strings.Contains(s, "She") {
return strings.Replace(s, "She", "He", -1)
} else if strings.Contains(s, "He") {
return strings.Replace(s, "He", "She", -1)
}
return s
}
 
func main() {
s := "She was a soul stripper. She took my heart!"
t := reverseGender(s)
fmt.Println(t)
fmt.Println(reverseGender(t))
}</syntaxhighlight>
 
{{out}}
<pre>
He was a soul stripper. He took my heart!
She was a soul stripper. She took my heart!
</pre>
 
=={{header|Haskell}}==
 
We can optimise the time and space complexity of this computation by careful selection of the source and target languages (not specified in the task description, although the example appears to be drawn from some kind of Anglo-Saxon dialect, which seems a bit sub-optimal for these purposes).
 
Sino-Tibetan dialects generally work well here. If we choose any standard transcription of Modern Standard Chinese (such as Pinyin or IPA) or more or less any written sample of pre 19c literary Chinese, we can reduce the entire computation down to a very pleasing intersection of fully optimized space and time performance with reasonably clear and succinct code:
 
{{works with|汉语拼音}}
{{works with|文言文}}
<syntaxhighlight lang="haskell">id</syntaxhighlight>
 
=={{header|J}}==
 
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:
 
<syntaxhighlight lang="j">cheaptrick=: rplc&(;:'She He He She')</syntaxhighlight>
 
And, the task example:
 
<syntaxhighlight lang="j"> 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!</syntaxhighlight>
 
=={{header|Java}}==
{{trans|J}}
<syntaxhighlight lang="java">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;
}
}</syntaxhighlight>
 
<pre>He was a soul stripper. He took my heart!
She was a soul stripper. She took my heart!</pre>
 
=={{header|jq}}==
''Adapted from [[#Wren|Wren]]''
{{works with|jq}}
'''Also works with both jaq and gojq, the Rust and Go implementations of jq'''
 
In this entry, we use the Unicode character classes for "open", "close",
and "other" punctuation, but show the test for a small set of specific
punctuation characters.
 
<syntaxhighlight lang="jq">
def swaps: {
"She": "He", "she": "he", "Her": "His", "her": "his", "hers": "his", "He": "She",
"he": "she", "His": "Her", "his": "her", "him": "her"
};
 
def isPunctuation:
type == "string" and
length == 1 and
# test("[!\"#%&'()*,-./:;?@\\[\\]\\\\_{}¡§«¶·»¿]")
# open, close, other
test("\\p{Ps}|\\p{Pe}|\\p{Po}|")
;
def reverseGender:
reduce splits(" *") as $word ([];
swaps[$word] as $s
| if $s then . + [$s]
elif ($word[-1:] | isPunctuation)
then swaps[$word[:-1]] as $s
| if $s then . + [$s + $word[-1:]]
else . + [$word]
end
else . + [$word]
end)
| join(" ");
 
def sentences: [
"She was a soul stripper. She took his heart!",
"He was a soul stripper. He took her heart!",
"She wants what's hers, he wants her and she wants him!",
"Her dog belongs to him but his dog is hers!"
];
 
sentences[]
| reverseGender
</syntaxhighlight>
{{Output}}
As for [[#Wren|Wren]].
 
=={{header|Julia}}==
{{trans|Kotlin}}
<syntaxhighlight lang="julia">module ReverseGender
 
const MARKER = "\0"
 
const words = "^" .* ["She", "she", "Her", "her", "hers", "He", "he", "His", "his", "him"] .* "\$" .|> Regex
const repls = ["He", "he", "His", "his" ,"his", "She", "she", "Her", "her", "her"] .* MARKER
 
function reverse(s::AbstractString)
for (w, r) in zip(words, repls)
s = replace(s, w => r)
end
return replace(s, MARKER => "")
end
 
end # module ReverseGender
 
@show ReverseGender.reverse("She was a soul stripper. She took his heart!")
@show ReverseGender.reverse("He was a soul stripper. He took her heart!")
@show ReverseGender.reverse("She wants what's hers, he wants her and she wants him!")
@show ReverseGender.reverse("Her dog belongs to him but his dog is hers!")</syntaxhighlight>
 
=={{header|Kotlin}}==
This program uses a similar approach to the FreeBASIC entry:
<syntaxhighlight lang="scala">// 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!"))
}</syntaxhighlight>
 
{{out}}
<pre>
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!
</pre>
 
=={{header|Lua}}==
Sufficient for the task as worded, but without attempting to go beyond (because several indeterminate cases exist). It does at least demonstrate an idiomatic way of doing multiple simultaneous substring substitutions.
<syntaxhighlight lang="lua">function sufficient(s)
local xref = { She="He", He="She" }
return (s:gsub("(%w+)", function(s) return xref[s] or s end))
end
s = "She was a soul stripper. She took my heart!"
print(sufficient(s))
print(sufficient(sufficient(s)))
print(sufficient(sufficient(s)) == s)</syntaxhighlight>
{{out}}
<pre>He was a soul stripper. He took my heart!
She was a soul stripper. She took my heart!
true</pre>
 
=={{header|MiniScript}}==
<syntaxhighlight lang="miniscript">cap = function(w) // (capitalize a word)
return w[0].upper + w[1:]
end function
 
trans = {"she":"he", "her":"his", "hers":"his"}
trans = trans + {"he":"she", "his":"her", "him":"her"}
 
for k in trans.indexes
trans[cap(k)] = cap(trans[k])
end for
 
reverseGender = function(s)
s = s.replace(".", " .").replace(",", " ,").replace("?", " ?").replace("!", " !")
words = s.split
for i in words.indexes
if trans.hasIndex(words[i]) then words[i] = trans[words[i]]
end for
s = words.join
s = s.replace(" .", ".").replace(" ,", ",").replace(" ?", "?").replace(" !", "!")
return s
end function
 
test = function(s)
print "BEFORE: " + s
print "AFTER: " + reverseGender(s)
print
end function
 
test "She was a soul stripper. She took his heart!"
test "He was a soul stripper. He took her heart!"
test "She wants what's hers, he wants her and she wants him!"
test "Her dog belongs to him but his dog is hers!"</syntaxhighlight>
 
{{out}}
<pre>BEFORE: She was a soul stripper. She took his heart!
AFTER: He was a soul stripper. He took her heart!
 
BEFORE: He was a soul stripper. He took her heart!
AFTER: She was a soul stripper. She took his heart!
 
BEFORE: She wants what's hers, he wants her and she wants him!
AFTER: He wants what's his, she wants his and he wants her!
 
BEFORE: Her dog belongs to him but his dog is hers!
AFTER: His dog belongs to her but her dog is his!</pre>
 
=={{header|Nim}}==
{{trans|Kotlin}}
<syntaxhighlight lang="nim">import re, strutils
 
const
Words = ["She", "she", "Her", "her", "hers", "He", "he", "His", "his", "him"]
Repls = ["He_", "he_", "His_", "his_" ,"his_", "She_", "she_", "Her_", "her_", "her_"]
 
func reverseGender(s: string): string =
result = s
for i, word in Words:
let r = re(r"\b" & word & r"\b")
result = result.replace(r, Repls[i])
result = result.replace("_", "")
 
echo reverseGender("She was a soul stripper. She took his heart!")
echo reverseGender("He was a soul stripper. He took her heart!")
echo reverseGender("She wants what's hers, he wants her and she wants him!")
echo reverseGender("Her dog belongs to him but his dog is hers!")</syntaxhighlight>
 
{{out}}
<pre>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!</pre>
 
=={{header|Objeck}}==
{{trans|Java}}
<syntaxhighlight lang="objeck">class ReallyLameTranslationOfJ {
function : Main(args : String[]) ~ Nil {
s := "She was a soul stripper. She took my heart!";
CheapTrick(s)->PrintLine();
CheapTrick(CheapTrick(s))->PrintLine();
}
 
function : CheapTrick(s : String) ~ String {
if(s->Has("She")) {
return s->ReplaceAll("She", "He");
}
else if(s->Has("He")) {
return s->ReplaceAll("He", "She");
};
return s;
}
}
</syntaxhighlight>
 
Output:
<pre>
He was a soul stripper. He took my heart!
She was a soul stripper. She took my heart!
</pre>
 
=={{header|Perl}}==
A minimal implementation, using a hash to manage swaps. But this approach breaks down if, for instance, 'him' were to replace 'me', as 'her' can't be used to map to both 'his' and 'him'.
<syntaxhighlight lang="perl">my %swaps = (
'she' => 'he',
'his' => 'her',
);
 
$swaps{ $swaps{$_} } = $_ for keys %swaps; # inverted pairs
$swaps{ ucfirst $swaps{$_} } = ucfirst $_ for keys %swaps; # title-case version
 
sub gender_swap {
my($s) = @_;
$s =~ s/\b$_\b/_$swaps{$_}/g for keys %swaps; # swap and add guard character
$s =~ s/_//g; # remove guard
$s;
}
 
$original = qq{She was this soul sherpa. She took his heart! They say she's going to put me on a shelf.\n};
print $swapped = gender_swap($original);
print $reverted = gender_swap($swapped);</syntaxhighlight>
{{out}}
<pre>He was this soul sherpa. He took her heart! They say he's going to put me on a shelf.
She was this soul sherpa. She took his heart! They say she's going to put me on a shelf.</pre>
 
=={{header|Phix}}==
Oh well, I tried... There are a couple of mildly interesting points though:<br>
words is a pair-list, ie "she","he" maps both ways, with first-upper-case handled too, and<br>
replacing the words right->left means no need to fiddle with indexes when lengths differ.
<!--<syntaxhighlight lang="phix">(phixonline)-->
<span style="color: #008080;">constant</span> <span style="color: #000000;">words</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">{</span><span style="color: #008000;">"she"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"he"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"his"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"her"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"him"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"her"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"hers"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"his"</span><span style="color: #0000FF;">}</span>
<span style="color: #008080;">function</span> <span style="color: #000000;">reverse_gender</span><span style="color: #0000FF;">(</span><span style="color: #004080;">string</span> <span style="color: #000000;">s</span><span style="color: #0000FF;">)</span>
<span style="color: #004080;">integer</span> <span style="color: #000000;">ch</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">wordend</span>
<span style="color: #004080;">bool</span> <span style="color: #000000;">inword</span> <span style="color: #0000FF;">=</span> <span style="color: #004600;">false</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">wordch</span>
<span style="color: #008080;">for</span> <span style="color: #000000;">i</span><span style="color: #0000FF;">=</span><span style="color: #7060A8;">length</span><span style="color: #0000FF;">(</span><span style="color: #000000;">s</span><span style="color: #0000FF;">)</span> <span style="color: #008080;">to</span> <span style="color: #000000;">0</span> <span style="color: #008080;">by</span> <span style="color: #0000FF;">-</span><span style="color: #000000;">1</span> <span style="color: #008080;">do</span>
<span style="color: #000000;">ch</span> <span style="color: #0000FF;">=</span> <span style="color: #008080;">iff</span><span style="color: #0000FF;">(</span><span style="color: #000000;">i</span><span style="color: #0000FF;">=</span><span style="color: #000000;">0</span><span style="color: #0000FF;">?</span><span style="color: #008000;">' '</span><span style="color: #0000FF;">:</span><span style="color: #000000;">s</span><span style="color: #0000FF;">[</span><span style="color: #000000;">i</span><span style="color: #0000FF;">])</span>
<span style="color: #000000;">wordch</span> <span style="color: #0000FF;">=</span> <span style="color: #008080;">not</span> <span style="color: #7060A8;">find</span><span style="color: #0000FF;">(</span><span style="color: #000000;">ch</span><span style="color: #0000FF;">,</span><span style="color: #008000;">" .,'!\n"</span><span style="color: #0000FF;">)</span>
<span style="color: #008080;">if</span> <span style="color: #000000;">inword</span> <span style="color: #008080;">then</span>
<span style="color: #008080;">if</span> <span style="color: #008080;">not</span> <span style="color: #000000;">wordch</span> <span style="color: #008080;">then</span>
<span style="color: #004080;">string</span> <span style="color: #000000;">word</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">lower</span><span style="color: #0000FF;">(</span><span style="color: #000000;">s</span><span style="color: #0000FF;">[</span><span style="color: #000000;">i</span><span style="color: #0000FF;">+</span><span style="color: #000000;">1</span><span style="color: #0000FF;">..</span><span style="color: #000000;">wordend</span><span style="color: #0000FF;">])</span>
<span style="color: #004080;">integer</span> <span style="color: #000000;">k</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">find</span><span style="color: #0000FF;">(</span><span style="color: #000000;">word</span><span style="color: #0000FF;">,</span><span style="color: #000000;">words</span><span style="color: #0000FF;">)</span>
<span style="color: #008080;">if</span> <span style="color: #000000;">k</span> <span style="color: #008080;">then</span>
<span style="color: #004080;">string</span> <span style="color: #000000;">rep</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">words</span><span style="color: #0000FF;">[</span><span style="color: #008080;">iff</span><span style="color: #0000FF;">(</span><span style="color: #7060A8;">mod</span><span style="color: #0000FF;">(</span><span style="color: #000000;">k</span><span style="color: #0000FF;">,</span><span style="color: #000000;">2</span><span style="color: #0000FF;">)?</span><span style="color: #000000;">k</span><span style="color: #0000FF;">+</span><span style="color: #000000;">1</span><span style="color: #0000FF;">:</span><span style="color: #000000;">k</span><span style="color: #0000FF;">-</span><span style="color: #000000;">1</span><span style="color: #0000FF;">)]</span>
<span style="color: #000080;font-style:italic;">-- if s[i+2..wordend]=rep[2..$] then -- might be wanted here
-- -- (either skipping completely or all upper-&gt;all upper)</span>
<span style="color: #008080;">if</span> <span style="color: #000000;">s</span><span style="color: #0000FF;">[</span><span style="color: #000000;">i</span><span style="color: #0000FF;">+</span><span style="color: #000000;">1</span><span style="color: #0000FF;">]!=</span><span style="color: #000000;">words</span><span style="color: #0000FF;">[</span><span style="color: #000000;">k</span><span style="color: #0000FF;">][</span><span style="color: #000000;">1</span><span style="color: #0000FF;">]</span> <span style="color: #008080;">then</span> <span style="color: #000000;">rep</span><span style="color: #0000FF;">[</span><span style="color: #000000;">1</span><span style="color: #0000FF;">]</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">upper</span><span style="color: #0000FF;">(</span><span style="color: #000000;">rep</span><span style="color: #0000FF;">[</span><span style="color: #000000;">1</span><span style="color: #0000FF;">])</span> <span style="color: #008080;">end</span> <span style="color: #008080;">if</span>
<span style="color: #000000;">s</span><span style="color: #0000FF;">[</span><span style="color: #000000;">i</span><span style="color: #0000FF;">+</span><span style="color: #000000;">1</span><span style="color: #0000FF;">..</span><span style="color: #000000;">wordend</span><span style="color: #0000FF;">]</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">rep</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">if</span>
<span style="color: #000000;">inword</span> <span style="color: #0000FF;">=</span> <span style="color: #004600;">false</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">if</span>
<span style="color: #008080;">elsif</span> <span style="color: #000000;">wordch</span> <span style="color: #008080;">then</span>
<span style="color: #000000;">inword</span> <span style="color: #0000FF;">=</span> <span style="color: #004600;">true</span>
<span style="color: #000000;">wordend</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">i</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">if</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">for</span>
<span style="color: #008080;">return</span> <span style="color: #000000;">s</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">function</span>
<span style="color: #008080;">constant</span> <span style="color: #000000;">tests</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">{</span><span style="color: #008000;">"She was a soul stripper. She took my heart!\n"</span><span style="color: #0000FF;">,</span>
<span style="color: #008000;">"Her dog belongs to him but his dog is hers!\n"</span><span style="color: #0000FF;">}</span> <span style="color: #000080;font-style:italic;">-- ha ha!</span>
<span style="color: #008080;">for</span> <span style="color: #000000;">i</span><span style="color: #0000FF;">=</span><span style="color: #000000;">1</span> <span style="color: #008080;">to</span> <span style="color: #7060A8;">length</span><span style="color: #0000FF;">(</span><span style="color: #000000;">tests</span><span style="color: #0000FF;">)</span> <span style="color: #008080;">do</span>
<span style="color: #004080;">string</span> <span style="color: #000000;">ti</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">tests</span><span style="color: #0000FF;">[</span><span style="color: #000000;">i</span><span style="color: #0000FF;">],</span>
<span style="color: #000000;">r</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">reverse_gender</span><span style="color: #0000FF;">(</span><span style="color: #000000;">ti</span><span style="color: #0000FF;">),</span>
<span style="color: #000000;">rr</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">reverse_gender</span><span style="color: #0000FF;">(</span><span style="color: #000000;">r</span><span style="color: #0000FF;">)</span>
<span style="color: #7060A8;">puts</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span><span style="color: #000000;">ti</span><span style="color: #0000FF;">&</span><span style="color: #000000;">r</span><span style="color: #0000FF;">&</span><span style="color: #000000;">rr</span><span style="color: #0000FF;">&</span><span style="color: #008000;">"\n"</span><span style="color: #0000FF;">)</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">for</span>
<!--</syntaxhighlight>-->
{{out}}
<pre>
She was a soul stripper. She took my heart!
He was a soul stripper. He took my heart!
She was a soul stripper. She took my heart!
 
Her dog belongs to him but his dog is hers!
His dog belongs to her but her dog is his!
Her dog belongs to his but his dog is her!
</pre>
 
=={{header|PowerShell}}==
{{trans|J}} (Made more PowerShelly.)
<syntaxhighlight lang="powershell">
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!")
</syntaxhighlight>
{{Out}}
<pre>
He was a soul stripper. He took my heart!
She was a soul stripper. She took my heart!
</pre>
 
=={{header|Python}}==
<langsyntaxhighlight Pythonlang="python">#!/usr/bin/env python
# -*- coding: utf-8 -*- #
Line 129 ⟶ 770:
return "".join([ word+switch[gen] for word,gen in zip(text[::2],text[1::2])])+text[-1]
print rev_gender(text)</langsyntaxhighlight>
'''Output:'''
<pre>
Line 144 ⟶ 785:
 
=={{header|Racket}}==
<langsyntaxhighlight lang="racket">
#lang at-exp racket
 
Line 239 ⟶ 880:
by the cannibal propensity he nourished in his untutored youth.
}))
</syntaxhighlight>
</lang>
{{out}}
<pre>
Line 254 ⟶ 895:
by the cannibal propensity she nourished in her untutored youth.
</pre>
 
=={{header|Raku}}==
(formerly Perl 6)
Mechanically, this task is trivial. Raku provides several flexible and powerful methods to wrangle text. Linguistically, this task is impossible (and laughable). Mappings are non-regular and in many cases, non-deterministic without semantic analysis of the content and context, which is '''WAY''' beyond what anyone is going to invest in a Rosettacode task. Whatever.
 
For extremely limited circumstances such as this example, this should suffice. Notice case matching and replication. Handles contractions, but ignores embedded matching text.
 
<syntaxhighlight lang="raku" line>say S:g:ii/«'she'»/he/ given "She was a soul stripper. She took my heart! They say she's going to put me on a shelf.";</syntaxhighlight>
{{out}}
<pre>He was a soul stripper. He took my heart! They say he's going to put me on a shelf.</pre>
 
=={{header|REXX}}==
Not much effort was put into compressing the words (as far as pluralizing and constructing the
various forms of words). &nbsp; More code could be written to parse words that have a minushyphen &nbsp; (or hyphenminus).
 
The 1<sup>st</sup> letter of each word in examined and it's case (lower/upper) is preserved.
:: But this looks wrong in the shown output: "about hers native woodlands"
 
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).
<lang rexx>/*REXX program to reverse genderize a text string. */
<syntaxhighlight lang="rexx">/*REXX program reverse genderizes a text string (that may contain gender-specific words)*/
sw=80-1 /*could use: SW=LINESIZE()-1 */
parse varvalue sw .linesize()-1 @ @. !.with sw @ @. !. /*get screen width, /*nullify some REXX variablesvars. */
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. */
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.'
 
@=@ "abboty abbess"
call tell old, ' old ' /*show a nicely parse "old" text.*/
@=@ 'abboty"actor abbess'actress"
@=@ "ad-boy ad-girl ad-man ad-woman ad-men ad-women"
@=@ 'actor actress'
@=@ "adboy adgirl adman adwoman admen adwomen"
@=@ 'adonis belle'
@=@ "administrator administratrix"
@=@ 'adulterer adultress'
@=@ 'archer"adonis archeress'belle"
@=@ "adulterer adultress"
@=@ 'administrator administratrix'
@=@ "agribusinessboy agribusinessgirl"
@=@ 'ambassador ambassadress'
@=@ "agribusinessman agribusinesswoman agribusinessmen agribusinesswomen"
@=@ 'anchor anchress'
@=@ "aidboy aidgirl aidman aidwoman aidmen aidwomen"
@=@ 'archduke archduchess'
@=@ "airboy airgirl airman airwoman airmen airwomen"
@=@ 'author authoress'
@=@ "aircraftboy aircraftgirl aircraftman aircraftwoman aircraftmen aircraftwomen"
@=@ 'aviator aviatrix aviators aviatrices'
@=@ "aircraftsboy aircraftsgirl aircraftsman aircraftswoman aircraftsmen aircraftswomen"
@=@ 'bachelor bachelorette bachelor spinster'
@=@ "aircrewboy aircrewgirl aircrewman aircrewwoman aircrewmen aircrewwomen"
@=@ 'ballerino ballerina'
@=@ "alderboy aldergirl alderman alderwoman aldermen alderwomen"
@=@ 'barkeeper barkeeperess'
@=@ "almsboy almsgirl"
@=@ 'barman barwoman barmen barwomen barman barmaid'
@=@ "almsman almswoman almsmen almswomen"
@=@ 'baron baroness baronet baronetess bt btss'
@=@ "alterboy altergirl alterman alterwoman altermen alterwomen"
@=@ 'batboy batgirl'
@=@ "alongshoreboy alongshoregirl"
@=@ 'batman batwoman'
@=@ "alongshoreman alongshorewoman alongshoremen alongshorewomen"
@=@ 'benefactor benefactress'
@=@ "ambassador ambassadress"
@=@ 'billy nanny billies nannies'
@=@ "ambulanceboy ambulancegirl ambulanceman ambulancewoman ambulancemen ambulancewomen"
@=@ 'blond blonde'
@=@ 'boar"anchor sow'anchress"
@=@ "anchorboy anchorgirl anchorman anchorwoman anchormen anchorwomen"
@=@ 'boy girl boyfriend girlfriend boyhood girlhood boytoy girltoy'
@=@ "apeboy apegirl apeman apewoman apemen apewomen"
@=@ 'brother sister brotherhood sisterhood brotherly sisterly'
@=@ "archduke archduchess"
@=@ 'buck doe'
@=@ "archer archeress"
@=@ 'bull cow bullshit cowshit'
@=@ "artilleryboy artillerygirl artilleryman artillerywoman artillerymen artillerywomen"
@=@ 'butcher butcheress'
@=@ "artsboy artsgirl artsman artswoman artsmen artswomen"
@=@ 'caliph calafia caliph calipha'
@=@ "assboy assgirl assman asswoman assmen asswomen"
@=@ 'caterer cateress'
@=@ "assemblyboy assemblygirl assemblyman assemblywoman assemblymen assemblywomen"
@=@ 'chanter chantress'
@=@ "attackboy attackgirl attackman attackwoman attackmen attackwomen"
@=@ 'chairman chairwoman chairmen chairwomen'
@=@ 'chief"author chiefess'authoress"
@=@ "aviator aviatrix aviators aviatrices"
@=@ 'clerk clerkess'
@=@ "axboy axgirl axman axwoman axmen axwomen"
@=@ 'coadjutor cadutrix'
@=@ "axeboy axegirl axeman axewoman axemen axewomen"
@=@ 'cock hen'
@=@ "bachelor bachelorette bachelor spinster"
@=@ 'colt fillie'
@=@ "backboy backgirl backman backwoman backmen backwomen"
@=@ 'commedian comedienne'
@=@ "backwoodsboy backwoodsgirl backwoodsman backwoodswoman backwoodsmen backwoodswomen"
@=@ 'conductor conductress'
@=@ "badboy badgirl badman badwoman badmen badwomen"
@=@ 'confessor confessoress'
@=@ "bagboy baggirl bagman bagwoman bagmen bagwomen"
@=@ 'conquer conqueress'
@=@ "baggageboy baggagegirl baggageman baggagewoman baggagemen baggagewomen"
@=@ 'cook cookess'
@=@ "bail-bondsboy bail-bondsgirl"
@=@ 'count countess'
@=@ "bail-bondsman bail-bondswoman bail-bondsmen bail-bondswomen"
@=@ 'cowboy cowgirl cowman cowwoman cowmen cowwomen'
@=@ "bailsboy bailsgirl bailsman bailswoman bailsmen bailswomen"
@=@ 'czar czarina'
@=@ "ballerino ballerina"
@=@ 'dad mom dada mama daddy mommy daddies mommies'
@=@ "bandsboy bandsgirl bandsman bandswoman bandsmen bandswomen"
@=@ 'deacon deaconess'
@=@ "barboy bargirl barman barwoman barmen barwomen barman barmaid"
@=@ 'debutant debutante'
@=@ "bargeboy bargegirl bargeman bargewoman bargemen bargewomen"
@=@ 'demon demoness'
@=@ "barkeeper barkeeperess"
@=@ 'devil deviless'
@=@ "baron baroness baronet baronetess"
@=@ 'director directress'
@=@ "baseboy basegirl baseman basewoman basemen basewomen"
@=@ 'divine divineress'
@=@ "bassboy bassgirl bassman basswoman bassmen basswomen"
@=@ 'divorce divorcee'
@=@ "batboy batgirl batman batwoman batmen batwomen"
@=@ 'doctor doctress'
@=@ "batsboy batsgirl batsman batswoman batsmen batswomen"
@=@ 'dominator dominatrix dominators dominatrices'
@=@ "bayboy baygirl bayman baywoman baymen baywomen"
@=@ 'dragon dragoness'
@=@ "beadsboy beadsgirl beadsman beadswoman beadsmen beadswomen"
@=@ 'drone bee'
@=@ "bedesboy bedesgirl bedesman bedeswoman bedesmen bedeswomen"
@=@ 'drake duck'
@=@ "beggarboy beggargirl beggarman beggarwoman beggarmen beggarwomen"
@=@ 'dude dudette'
@=@ "bellboy bellgirl bellman bellwoman bellmen bellwomen"
@=@ 'duke duchess'
@=@ "benefactor benefactress"
@=@ 'earl countess'
@=@ "billboy billgirl billman billwoman billmen billwomen"
@=@ 'editor editress editor editrix'
@=@ "billy nanny billies nannies"
@=@ 'elector electress'
@=@ "billygoat nannygoat"
@=@ 'emperor empress'
@=@ "binboy bingirl binman binwoman binmen binwomen"
@=@ 'enchanter enchantress'
@=@ "birdboy birdgirl birdman birdwoman birdmen birdwomen"
@=@ 'executor executrix executor executres'
@=@ "blond blonde"
@=@ 'ex-husband ex-wife ex-husbands ex-wives ex-boyfriend ex-girlfriend'
@=@ "bluesboy bluesgirl bluesman blueswoman bluesmen blueswomen"
@=@ 'father mother fatherhood motherhood fatherphocker motherphocker'
@=@ 'fiance"boar fiancee'sow"
@=@ "boardboy boardgirl boardman boardwoman boardmen boardwomen"
@=@ 'fisherman fisherwoman fishermen fisherwomen'
@=@ "boatboy boatgirl boatman boatwoman boatmen boatwomen"
@=@ 'fishman fishwoman fishmen fishwomen'
@=@ "boatsboy boatsgirl boatsman boatswoman boatsmen boatswomen"
@=@ 'foreman forewoman foremen forewomen'
@=@ "bogeyboy bogeygirl bogeyman bogeywoman bogeymen bogeywomen"
@=@ 'friar nun'
@=@ "bogyboy bogygirl bogyman bogywoman bogymen bogywomen"
@=@ 'gander goose ganders geese'
@=@ "boilerboy boilergirl boilerman boilerwoman boilermen boilerwomen"
@=@ 'giant giantess'
@=@ "bombardboy bombardgirl bombardman bombardwoman bombardmen bombardwomen"
@=@ 'gladiator gladiatrix'
@=@ "bondboy bondgirl bondman bondwoman bondmen bondwomen"
@=@ 'god godess godson goddaughter'
@=@ "bondsboy bondsgirl bondsman bondswoman bondsmen bondswomen"
@=@ 'governor governoress'
@=@ "bonesboy bonesgirl bonesman boneswoman bonesmen boneswomen"
@=@ 'granddad grandmom grandfather grandmother grandpapa grandmama'
@=@ "boogeyboy boogeygirl boogeyman boogeywoman boogeymen boogeywomen"
@=@ 'grandpop grandmom grandpa grandma grandpapa grandmama'
@=@ "boogieboy boogiegirl boogieman boogiewoman boogiemen boogiewomen"
@=@ 'grandnephew grandniece grandson granddaughter gramp granny'
@=@ "boogyboy boogygirl boogyman boogywoman boogymen boogywomen"
@=@ 'groom bride bridegroom bride groomsman groomswoman groomsmen groomswomen'
@=@ "bookboy bookgirl bookman bookwoman bookmen bookwomen"
@=@ 'guy gal'
@=@ "boothboy boothgirl boothman boothwoman boothmen boothwomen"
@=@ 'he she him her himself herself his hers'
@=@ "bordboy bordgirl bordman bordwoman bordmen bordwomen"
@=@ 'headmaster headmistress'
@=@ "bowboy bowgirl bowman bowwoman bowmen bowwomen"
@=@ 'heir heiress'
@=@ "bowsboy bowsgirl bowsman bowswoman bowsmen bowswomen"
@=@ 'helmsman helmswoman helmsmen helmswomen'
@=@ "boxboy boxgirl boxman boxwoman boxmen boxwomen"
@=@ 'heritor heritress heritor heritrix'
@=@ "boy girl boydom girldom boyhood girlhood"
@=@ 'hero heroine'
@=@ 'hob"boy-band jill'girl-band"
@=@ "boy-oh-boy girl-oh-girl"
@=@ 'horseman horsewoman horsemen horsewomen'
@=@ "boychildren girlchildren"
@=@ 'host hostess'
@=@ "boyfriend girlfriend"
@=@ 'hunter huntress'
@=@ "boyish girlish boyism girlism"
@=@ 'husband wife husbands wives'
@=@ "boyish-looking girlish-looking boyishly girlishly boyishness girlishness"
@=@ 'incubii sucubii incubus succubus'
@=@ "boylike girllike boylikeness girllikeness boyliker girlliker"
@=@ 'inheritor inheritress inheritor inheritrix'
@=@ "boylikest girllikest boyscout girlscout boyship girlship"
@=@ 'instructor instructress'
@=@ "brakeboy brakegirl brakeman brakewoman brakemen brakewomen"
@=@ 'jackaroo jillaroo jack jill'
@=@ "breadboy breadgirl breadman breadwoman breadmen breadwomen"
@=@ 'jew jewess'
@=@ "breakboy breakgirl breakman breakwoman breakmen breakwomen"
@=@ 'jointer jointress'
@=@ "brethern sistern"
@=@ 'khaliph khalafia khaliph khalipha'
@=@ "brickboy brickgirl brickman brickwoman brickmen brickwomen"
@=@ 'king queen king-hit queen-hit king-of-arms queen-of-arms'
@=@ "bridegroom bride"
@=@ 'kingcraft queencraft kingcup queencup kingdom queendom'
@=@ "bridesboy bridesgirl bridesman brideswoman bridesmen brideswomen"
@=@ 'kingdomful queendomful kingdomless queendomless kingdomship queendomship'
@=@ "briefboy briefgirl briefman briefwoman briefmen briefwomen"
@=@ 'kinged queened kinger queener kingest queenest kinghead queenhead'
@=@ "brinksboy brinksgirl brinksman brinkswoman brinksmen brinkswomen"
@=@ 'kinghood queenhood kinging queening kingless queenless'
@=@ "bro sis brother sister brotherhood sisterhood brotherly sisterly"
@=@ 'kinglessness queenlessness kinglier queenlier kingliest queenliest'
@=@ "brotherboy brothergirl brotherman brotherwoman brothermen brotherwomen"
@=@ 'kinglihood queenlihood kinglike queenlike kingliker queenliker'
@=@ "buck doe"
@=@ 'kinglikest queenlikest kingliness queenliness kingling queenling'
@=@ "bull cow bullshit cowshit"
@=@ 'kingling queenling kingly queenly kingmaker queenmaker'
@=@ "busboy busgirl busman buswoman busmen buswomen"
@=@ 'kingmaking queenmaking kingpiece queenpiece kingpin queenpin'
@=@ "bushboy bushgirl bushman bushwoman bushmen bushwomen"
@=@ 'kingpost queenpost kingship queenship kingside queenside'
@=@ "bushelboy bushelgirl bushelman bushelwoman bushelmen bushelwomen"
@=@ 'kingsize queensize kingsman queensman kingsmen queensmen'
@=@ "businessboy businessgirl businessman businesswoman businessmen businesswomen"
@=@ 'knight dame'
@=@ "butcher butcheress"
@=@ 'lad lass laddie lassie'
@=@ "butt-boy butt-girl butt-man butt-woman butt-men butt-women"
@=@ 'latino latina'
@=@ "butterboy buttergirl butterman butterwoman buttermen butterwomen"
@=@ 'landlord landlady landlords handladies landgrave landgravine'
@=@ "buttonboy buttongirl buttonman buttonwoman buttonmen buttonwomen"
@=@ 'launderer laundress'
@=@ "cabboy cabgirl cabman cabwoman cabmen cabwomen"
@=@ 'lawyer layeress'
@=@ "cakeboy cakegirl cakeman cakewoman cakemen cakewomen"
@=@ 'lion lioness'
@=@ "caliph calafia caliph calipha"
@=@ 'lord lady lords ladies'
@=@ "cameraboy cameragirl cameraman camerawoman cameramen camerawomen"
@=@ 'male female maleness femaleness man woman men women manly womanly'
@=@ "candy-boy candy-girl candy-man candy-woman candy-men candy-women"
@=@ 'manager manageress'
@=@ "candyboy candygirl candyman candywoman candymen candywomen"
@=@ 'manhood womenhood'
@=@ "canoeboy canoegirl canoeman canoewoman canoemen canoewomen"
@=@ 'manservant maidservant'
@=@ "carboy cargirl carman carwoman carmen carwomen"
@=@ 'margrave margavine'
@=@ "cartboy cartgirl cartman cartwoman cartmen cartwomen"
@=@ 'marquess marquis marquise marchioness'
@=@ 'masculine"caterer feminine'cateress"
@=@ "catfisherboy catfishergirl catfisherman catfisherwoman catfishermen catfisherwomen"
@=@ 'masseue masseuse'
@=@ "cattleboy cattlegirl cattleman cattlewoman cattlemen cattlewomen"
@=@ 'mayor mayoress'
@=@ "cavalryboy cavalrygirl cavalryman cavalrywoman cavalrymen cavalrywomen"
@=@ 'merman mermaid'
@=@ "caveboy cavegirl caveman cavewoman cavemen cavewomen"
@=@ 'mediator mediatress mediator mediatrix mediator mediatrice'
@=@ "cellarboy cellargirl cellarman cellarwoman cellarmen cellarwomen"
@=@ 'milkman milkwoman'
@=@ "centerboy centergirl centerman centerwoman centermen centerwomen"
@=@ 'millionaire millionairess billionaire billionairess'
@=@ "centreboy centregirl centreman centrewoman centremen centrewomen"
@=@ 'misandry misogyny misandrist misogynist'
@=@ "chainboy chaingirl chainman chainwoman chainmen chainwomen"
@=@ 'monk nun'
@=@ "chairboy chairgirl chairman chairwoman chairmen chairwomen"
@=@ 'monster monsteress'
@=@ 'moor"chanter morisco'chantress"
@=@ "chapboy chapgirl chapman chapwoman chapmen chapwomen"
@=@ 'mr mrs mister missus mr ms mr mz master miss master mistress'
@=@ "chapelboy chapelgirl chapelman chapelwoman chapelmen chapelwomen"
@=@ 'murderer murderess'
@=@ "charboy chargirl charman charwoman charmen charwomen"
@=@ 'negroe negress'
@=@ "checkweighboy checkweighgirl"
@=@ 'nephew niece'
@=@ "checkweighman checkweighwoman checkweighmen checkweighwomen"
@=@ 'nobelman noblewoman nobelmen nobelwomen'
@=@ "chessboy chessgirl chessman chesswoman chessmen chesswomen"
@=@ 'orator oratress orator oratrix'
@=@ 'pa"chief ma'chiefess"
@=@ "chinaboy chinagirl chinaman chinawoman chinamen chinawomen"
@=@ 'paternal maternal patriarchal matriarchal patron patroness'
@=@ "chineseboy chinesegirl chineseman chinesewoman chinesemen chinesewomen"
@=@ 'patricide matricide'
@=@ "churchboy churchgirl churchman churchwoman churchmen churchwomen"
@=@ 'peacock peahen'
@=@ "cisboy cisgirl cisman ciswoman cismen ciswomen"
@=@ 'plowman plowwoman plowmen plowwomen'
@=@ "clansboy clansgirl clansman clanswoman clansmen clanswomen"
@=@ 'poet poetess'
@=@ "classboy classgirl classman classwoman classmen classwomen"
@=@ 'preacher preacheress'
@=@ "clergyboy clergygirl clergyman clergywoman clergymen clergywomen"
@=@ 'priest priestess'
@=@ 'prince"clerk princess'clerkess"
@=@ "clubboy clubgirl clubman clubwoman clubmen clubwomen"
@=@ 'prior prioress'
@=@ "coachboy coachgirl coachman coachwoman coachmen coachwomen"
@=@ 'proprietor proprietress'
@=@ "coadjutor cadutrix"
@=@ 'prophet prophetess'
@=@ "coalboy coalgirl coalman coalwoman coalmen coalwomen"
@=@ 'protor protectress'
@=@ "coastguardsboy coastguardsgirl"
@=@ 'ram ewe billy ewe'
@=@ "coastguardsman coastguardswoman coastguardsmen coastguardswomen"
@=@ 'schoolmaster schoolmistress'
@=@ "cock hen"
@=@ 'scotsman scotswoman scotsmen scotswomen'
@=@ "cocksboy cocksgirl cocksman cockswoman cocksmen cockswomen"
@=@ 'sculptor sculptress'
@=@ "cogboy coggirl cogman cogwoman cogmen cogwomen"
@=@ 'seducer seduceress'
@=@ "colorboy colorgirl colorman colorwoman colormen colorwomen"
@=@ 'seductor seductress'
@=@ "colourboy colourgirl colourman colourwoman colourmen colourwomen"
@=@ 'sempster sempstress'
@=@ 'senor"colt senora'fillie"
@=@ "commedian comedienne"
@=@ 'sheepman sheepwoman sheepmen sheepwoman'
@=@ "committeeboy committeegirl committeeman committeewoman committeemen committeewomen"
@=@ 'shepherd shepherdess'
@=@ "commonwealthboy commonwealthgirl"
@=@ 'singer singeress'
@=@ "commonwealthman commonwealthwoman commonwealthmen commonwealthwomen"
@=@ 'sir madam'
@=@ "commonwealthsboy commonwealthsgirl"
@=@ 'sire dam'
@=@ "commonwealthsman commonwealthswoman commonwealthsmen commonwealthswomen"
@=@ 'son daughter'
@=@ "conboy congirl conman conwoman conmen conwomen"
@=@ 'songster songstress'
@=@ "conductor conductress"
@=@ 'sorcerer sorceress'
@=@ "confessor confessoress"
@=@ 'spokesman spokeswoman spokesmen spokeswomen'
@=@ "congressboy congressgirl congressman congresswoman congressmen congresswomen"
@=@ 'stag hind'
@=@ "conquer conqueress"
@=@ 'stallion mare'
@=@ 'steer"cook heifer'cookess"
@=@ "copeboy copegirl copeman copewoman copemen copewomen"
@=@ 'stepdad stepmom stepfather stepmother stepson stepdaughter'
@=@ "cornerboy cornergirl cornerman cornerwoman cornermen cornerwomen"
@=@ 'steward stewardess'
@=@ "cornishboy cornishgirl cornishman cornishwoman cornishmen cornishwomen"
@=@ 'suitor suitress'
@=@ "corpsboy corpsgirl corpsman corpswoman corpsmen corpswomen"
@=@ 'sultan sultana'
@=@ "councilboy councilgirl councilman councilwoman councilmen councilwomen"
@=@ 'tailor seamstress'
@=@ "count countess"
@=@ 'taskmaster taskmistress'
@=@ "counterboy countergirl counterman counterwoman countermen counterwomen"
@=@ 'temptor temptress'
@=@ "countryboy countrygirl countryman countrywoman countrymen countrywomen"
@=@ 'terminator terminatrix'
@=@ "cowboy cowgirl cowman cowwoman cowmen cowwomen"
@=@ 'toastmaster toastmistress'
@=@ "cracksboy cracksgirl cracksman crackswoman cracksmen crackswomen"
@=@ 'tiger tigress'
@=@ "craftsboy craftsgirl craftsman craftswoman craftsmen craftswomen"
@=@ 'tod vixen'
@=@ "cragsboy cragsgirl cragsman cragswoman cragsmen cragswomen"
@=@ 'tom hen'
@=@ "crayfisherboy crayfishergirl"
@=@ 'traitor traitress'
@=@ "crayfisherman crayfisherwoman crayfishermen crayfisherwomen"
@=@ 'tutor tutoress'
@=@ "cyberboy cybergirl cyberman cyberwoman cybermen cyberwomen"
@=@ 'tzar tzarina'
@=@ 'usher"czar usherette'czarina"
@=@ "dad mom dada mama daddy mommy daddies mommies"
@=@ 'uncle aunt'
@=@ "dairyboy dairygirl dairyman dairywoman dairymen dairywomen"
@=@ 'vampire vampiress'
@=@ "dangerboy dangergirl dangerman dangerwoman dangermen dangerwomen"
@=@ 'victor victress'
@=@ "daysboy daysgirl daysman dayswoman daysmen dayswomen"
@=@ 'villian villainess'
@=@ "deacon deaconess"
@=@ 'viscount viscountess viscount visereine'
@=@ "deadboy deadgirl deadman deadwoman deadmen deadwomen"
@=@ 'vixor vixen'
@=@ "debutant debutante"
@=@ 'votary votaress votary votress votaries votresses'
@=@ "demesboy demesgirl demesman demeswoman demesmen demeswomen"
@=@ 'waiter waitress'
@=@ "demon demoness"
@=@ 'warrior warrioress warlock witch'
@=@ "deskboy deskgirl deskman deskwoman deskmen deskwomen"
@=@ 'warder wardess'
@=@ "devil deviless"
@=@ 'whoremonger whore whoremonger strumpet'
@=@ "director directress"
@=@ 'wizard witch'
@=@ "dirtboy dirtgirl dirtman dirtwoman dirtmen dirtwomen"
@=@ 'werewolf wifwolf'
@=@ 'widower"divine widow'divineress"
@=@ "divorce divorcee"
@=@ "doctor doctress"
@=@ "dog bitch dogs bitches"
@=@ "dominator dominatrix dominators dominatrices"
@=@ "dragon dragoness"
@=@ "drake duck"
@=@ "draftboy draftgirl draftman draftwoman drafemen drafewomen"
@=@ "draftsboy draftsgirl draftsman draftswoman draftsmen draftswomen"
@=@ "draughtsboy draughtsgirl draughtsman draughtswoman draughtsmen draughtswomen"
@=@ "drayboy draygirl drayman draywoman draymen draywomen"
@=@ "drone bee"
@=@ "dude dudette"
@=@ "duke duchess"
@=@ "dutchboy dutchgirl"
@=@ "dutchman dutchwoman dutchmen dutchwomen"
@=@ "earl countess"
@=@ "earthboy earthgirl earthman earthwoman earthmen earthwomen"
@=@ "earthsboy earthsgirl earthsman earthswoman earthsmen earthswomen"
@=@ "editor editress"
@=@ "editor editrix"
@=@ "elector electress"
@=@ "emperor empress"
@=@ "enchanter enchantress"
@=@ "englishboy englishgirl englishman englishwoman englishmen englishwomen"
@=@ "everyboy everygirl everyman everywoman everymen everywomen"
@=@ "ex-boyfriend ex-girlfriend ex-husband ex-wife ex-husbands ex-wives"
@=@ "executor executrix executor executres"
@=@ "faceboy facegirl faceman facewoman facemen facewomen"
@=@ "father mother"
@=@ "fatherfucker motherfucker fatherphocker motherphocker fatherfucker mutherfucker"
@=@ "fatherhood motherhood"
@=@ "fiance fiancee"
@=@ "fireboy firegirl fireman firewoman firemen firewomen"
@=@ "fisherboy fishergirl fisherman fisherwoman fishermen fisherwomen"
@=@ "fishboy fishgirl fishman fishwoman fishmen fishwomen"
@=@ "foeboy foegirl foeman foewoman foemen foewomen"
@=@ "foreboy foregirl foreman forewoman foremen forewomen"
@=@ "freeboy freegirl freedman freedwoman freedmen freedwomen"
@=@ "freedboy freedgirl freeman freewoman freemen freewomen"
@=@ "frenchboy frenchgirl frenchman frenchwoman frenchmen frenchwomen"
@=@ "fretboy fretgirl fretman fretwoman fretmen fretwomen"
@=@ "friar nun"
@=@ "frontboy frontgirl frontiersboy frontiersgirl"
@=@ "frontiersman frontierswoman frontiersmen frontierswomen"
@=@ "frontman frontwoman frontmen frontwomen"
@=@ "funnyboy funnygirl funnyman funnywoman funnymen funnywomen"
@=@ "gander goose ganders geese"
@=@ "gasboy gasgirl gasman gaswoman gasmen gaswomen"
@=@ "gentleboy gentlegirl gentleman gentlewoman gentlemen gentlewomen"
@=@ "giant giantess"
@=@ "gigolo hooker"
@=@ "gladiator gladiatrix"
@=@ "gleeboy gleegirl gleeman gleewoman gleemen gleewomen"
@=@ "gloveboy glovegirl"
@=@ "gloveman glovewoman glovemen glovewomen"
@=@ "god godess"
@=@ "godfather godmother godson goddaughter"
@=@ "governor governoress"
@=@ "gownboy gowngirl gownman gownwoman gownmen gownwomen"
@=@ "gownsboy gownsgirl gownsman gownswoman gownsmen gownswomen"
@=@ "gramp granny"
@=@ "granddad grandmom"
@=@ "grandfather grandmother"
@=@ "grandnephew grandniece"
@=@ "grandpa grandma"
@=@ "grandpapa grandmama"
@=@ "grandpop grandmom"
@=@ "grandson granddaughter"
@=@ "great-granddad great-grandmom"
@=@ "great-grandfather great-grandmother"
@=@ "great-grandnephew great-grandniece"
@=@ "great-grandpa great-grandma"
@=@ "great-grandpapa great-grandmama"
@=@ "great-grandpop great-grandmom"
@=@ "great-grandson great-granddaughter"
@=@ "great-granduncle great-grandaunt"
@=@ "great-granduncle great-grandauntie"
@=@ "great-great-granddad great-great-grandmom"
@=@ "great-great-grandfather great-great-grandmother"
@=@ "great-great-grandnephew great-great-grandniece"
@=@ "great-great-grandpa great-great-grandma"
@=@ "great-great-grandpapa great-great-grandmama"
@=@ "great-great-grandpop great-great-grandmom"
@=@ "great-great-grandson great-great-granddaughter"
@=@ "great-great-granduncle great-great-grandaunt"
@=@ "great-great-granduncle great-great-grandauntie"
@=@ "great-great-great-granddad great-great-great-grandmom"
@=@ "great-great-great-grandfather great-great-great-grandmother"
@=@ "great-great-great-grandnephew great-great-great-grandniece"
@=@ "great-great-great-grandpa great-great-great-grandma"
@=@ "great-great-great-grandpapa great-great-great-grandmama"
@=@ "great-great-great-grandpop great-great-great-grandmom"
@=@ "great-great-great-grandson great-great-great-granddaughter"
@=@ "great-great-great-granduncle great-great-great-grandaunt"
@=@ "great-great-great-granduncle great-great-great-grandauntie"
@=@ "great-great-great-great-granddad great-great-great-great-grandmom"
@=@ "great-great-great-great-grandfather great-great-great-great-grandmother"
@=@ "great-great-great-great-grandnephew great-great-great-great-grandniece"
@=@ "great-great-great-great-grandpa great-great-great-great-grandma"
@=@ "great-great-great-great-grandpapa great-great-great-great-grandmama"
@=@ "great-great-great-great-grandpop great-great-great-great-grandmom"
@=@ "great-great-great-great-grandson great-great-great-great-granddaughter"
@=@ "great-great-great-great-granduncle great-great-great-great-grandaunt"
@=@ "great-great-great-great-granduncle great-great-great-great-grandauntie"
@=@ "great-great-great-great-great-granddad great-great-great-great-great-grandmom"
@=@ "great-great-great-great-great-grandfather great-great-great-great-great-grandmother"
@=@ "great-great-great-great-great-grandnephew great-great-great-great-great-grandniece"
@=@ "great-great-great-great-great-grandpa great-great-great-great-great-grandma"
@=@ "great-great-great-great-great-grandpapa great-great-great-great-great-grandmama"
@=@ "great-great-great-great-great-grandpop great-great-great-great-great-grandmom"
@=@ "great-great-great-great-great-grandson great-great-great-great-great-granddaughter"
@=@ "great-great-great-great-great-granduncle great-great-great-great-great-grandaunt"
@=@ "great-great-great-great-great-granduncle great-great-great-great-great-grandauntie"
@=@ "great-great-great-great-great-uncle great-great-great-great-great-grandaunt"
@=@ "great-great-great-great-great-uncle great-great-great-great-great-grandauntie"
@=@ "great-great-great-great-uncle great-great-great-great-grandaunt"
@=@ "great-great-great-great-uncle great-great-great-great-grandauntie"
@=@ "great-great-great-uncle great-great-great-grandaunt"
@=@ "great-great-great-uncle great-great-great-grandauntie"
@=@ "great-great-uncle great-great-grandaunt"
@=@ "great-great-uncle great-great-grandauntie"
@=@ "great-uncle great-grandaunt"
@=@ "great-uncle great-grandauntie"
@=@ "gringo gringa"
@=@ "groom bride"
@=@ "groomsboy groomsgirl groomsman groomswoman groomsmen groomswomen"
@=@ "groundsboy groundsgirl groundsman groundswoman groundsmen groundswomen"
@=@ "gunboy gungirl gunman gunwoman gunmen gunwomen"
@=@ "guy gal"
@=@ "hackboy hackgirl hackman hackwoman hackmen hackwomen"
@=@ "hammerboy hammergirl hammerman hammerwoman hammermen hammerwomen"
@=@ "handcraftsboy handcraftsgirl"
@=@ "handcraftsman handcraftswoman handcraftsmen handcraftswomen"
@=@ "handi-craftsboy handi-craftsgirl"
@=@ "handi-craftsman handi-craftswoman handi-craftsmen handi-craftswomen"
@=@ "hangboy hanggirl hangman hangwoman hangmen hangwomen"
@=@ "hardboy hardgirl hardman hardwoman hardmen hardwomen"
@=@ "hatchetboy hatchetgirl hatchetman hatchetwoman hatchetmen hatchetwomen"
@=@ "he she him her himself herself his hers his her"
@=@ "he-boy he-girl he-man he-woman he-men he-women"
@=@ "headmaster headmistress"
@=@ "heir heiress"
@=@ "helboy helgirl helman helwoman helmen helwomen"
@=@ "helmsman helmswoman helmsmen helmswomen"
@=@ "herdboy herdgirl herdman herdwoman herdmen herdwoman"
@=@ "heritor heritress heritor heritrix"
@=@ "hero heroine"
@=@ "highwayboy highwaygirl highwayman highwaywoman highwaymen highwaywomen"
@=@ "hillsboy hillsgirl hillsman hillswoman hillsmen hillswomen"
@=@ "hob jill"
@=@ "horseboy horsegirl horseman horsewoman horsemen horsewomen"
@=@ "host hostess"
@=@ "hunter huntress"
@=@ "husband wife husbands wives"
@=@ "hypeboy hypegirl hypeman hypewoman hypemen hypewomen"
@=@ "iceboy icegirl iceman icewoman icemen icewomen"
@=@ "incubii sucubii incubus succubus"
@=@ "inheritor inheritress inheritor inheritrix"
@=@ "instructor instructress"
@=@ "irishboy irishgirl irishman irishwoman irishmen irishwomen"
@=@ "ironboy irongirl ironman ironwoman ironmen ironwomen"
@=@ "jackaroo jillaroo jack jill"
@=@ "jew jewess"
@=@ "jointer jointress"
@=@ "khaliph khalafia khaliph khalipha"
@=@ "king queen"
@=@ "king-hit queen-hit"
@=@ "king-of-arms queen-of-arms"
@=@ "kingcraft queencraft"
@=@ "kingcup queencup"
@=@ "kingdom queendom"
@=@ "kingdomful queendomful kingdomless queendomless kingdomship queendomship"
@=@ "kinged queened"
@=@ "kinger queener"
@=@ "kingest queenest"
@=@ "kinghead queenhead"
@=@ "kinghood queenhood"
@=@ "kinging queening"
@=@ "kingless queenless kinglessness queenlessness"
@=@ "kinglier queenlier kingliest queenliest"
@=@ "kinglihood queenlihood"
@=@ "kinglike queenlike kingliker queenliker kinglikest queenlikest"
@=@ "kingliness queenliness"
@=@ "kingling queenling kingling queenling kingly queenly"
@=@ "kingmaker queenmaker kingmaking queenmaking"
@=@ "kingpiece queenpiece"
@=@ "kingpin queenpin kingpost queenpost"
@=@ "kingsboy kingsgirl kingsman kingswoman kingsmen kingswomen"
@=@ "kingship queenship"
@=@ "kingside queenside"
@=@ "kingsize queensize"
@=@ "kingsman queensman kingsmen queensmen"
@=@ "klansboy klansgirl klansman klanswoman klansmen klanswomen"
@=@ "kinglier queenlier kingliest queenliest"
@=@ "kinglihood queenlihood"
@=@ "kinglike queenlike kingliker queenliker kinglikest queenlikest"
@=@ "kingliness queenliness"
@=@ "kingling queenling kingling queenling kingly queenly"
@=@ "kingmaker queenmaker kingmaking queenmaking"
@=@ "kingpiece queenpiece"
@=@ "kingpin queenpin kingpost queenpost"
@=@ "kingsboy kingsgirl kingsman kingswoman kingsmen kingswomen"
@=@ "kingship queenship"
@=@ "kingside queenside"
@=@ "kingsize queensize"
@=@ "kingsman queensman kingsmen queensmen"
@=@ "klansboy klansgirl klansman klanswoman klansmen klanswomen"
@=@ "knight dame"
@=@ "lad lass laddie lassie"
@=@ "landgrave landgravine"
@=@ "landlord landlady landlords handladies"
@=@ "latino latina"
@=@ "launderer laundress"
@=@ "laundryboy laundrygirl laundryman laundrywoman laundrymen laundrywomen"
@=@ "lawboy lawgirl lawman lawwoman lawmen lawwomen"
@=@ "lawyer layeress"
@=@ "layboy laygirl layman laywoman laymen laywomen"
@=@ "leatherboy leathergirl leatherman leatherwoman leathermen leatherwomen"
@=@ "legboy leggirl legman legwoman legmen legwomen"
@=@ "liegeboy liegegirl liegeman liegewoman liegemen liegewomen"
@=@ "lineboy linegirl lineman linewoman linemen linewomen"
@=@ "linesboy linesgirl linesman lineswoman linesmen lineswomen"
@=@ "linkboy linkgirl linkman linkwoman linkmen linkwomen"
@=@ "lion lioness"
@=@ "lizardboy lizardgirl lizardman lizardwoman lizardmen lizardwomen"
@=@ "lord lady lords ladies"
@=@ "madboy madgirl madman madwoman madmen madwomen"
@=@ "mailboy mailgirl mailman mailwoman mailmen mailwomen"
@=@ "male female maleness femaleness"
@=@ "man woman men women"
@=@ "man-boy girl-worman"
@=@ "man-children woman-children manchildren womanchildren"
@=@ "manager manageress"
@=@ "manhood womenhood"
@=@ "manly womanly"
@=@ "manservant maidservant"
@=@ "margrave margavine"
@=@ "marquess marquis marquise marchioness"
@=@ "masculine feminine"
@=@ "masseue masseuse"
@=@ "mastboy mastgirl"
@=@ "mastman mastwoman mastmen mastwomen"
@=@ "maybe-boy maybe-girl maybe-man maybe-woman maybe-men maybe-women"
@=@ "mayor mayoress"
@=@ "mediator mediatress mediator mediatrix mediator mediatrice"
@=@ "men-children women-children menchildren womenchildren"
@=@ "merboy mergirl merman mermaid merman merwoman mermen merwomen"
@=@ "middleboy middlegirl middleman middlewoman middlemen middlewomen"
@=@ "midshipboy midshipgirl midshipman midshipwoman midshipmen midshipwomen"
@=@ "milkboy milkgirl milkman milkwoman milkmen milkwomen"
@=@ "millionaire millionairess billionaire billionairess"
@=@ "misandry misogyny misandrist misogynist"
@=@ "moneyboy moneygirl moneyman moneywoman moneymen moneywomen"
@=@ "monk nun"
@=@ "monster monsteress"
@=@ "moor morisco"
@=@ "mr mrs mister missus mr ms mr mz master miss master mistress"
@=@ "murderer murderess"
@=@ "muscleboy musclegirl muscleman musclewoman musclemen musclewomen"
@=@ "negroe negress negro negress"
@=@ "nephew niece"
@=@ "newsboy newsgirl newsman newswoman newsmen newswomen"
@=@ "newspaperboy newspapergirl newspaperman newspaperwoman newspapermen newspaperwomen"
@=@ "no-boy no-girl no-man no-woman no-men no-women"
@=@ "nobelman noblewoman nobelmen nobelwomen"
@=@ "nurseryboy nurserygirl nurseryman nurserywoman nurserymen nurserywomen"
@=@ "orator oratress orator oratrix"
@=@ "orchardboy orchardgirl orchardman orchardwoman orchardmen orchardwomen"
@=@ "overboy overgirl overman overwoman overmen overwomen"
@=@ "pa ma papa mama pop mom poppy mommy"
@=@ "paceboy pacegirl paceman pacewoman pacemen pacewomen"
@=@ "paternal maternal patriarchal matriarchal"
@=@ "patricide matricide"
@=@ "patrolboy patrolgirl patrolman patrolwoman patrolmen patrolwomen"
@=@ "patron patroness"
@=@ "peacock peahen"
@=@ "pitboy pitgirl pitman pitwoman pitmen pitwomen"
@=@ "pitchboy pitchgirl pitchman pitchwoman pitchmen pitchwomen"
@=@ "plowman plowwoman plowmen plowwomen"
@=@ "poet poetess"
@=@ "policeboy policegirl policeman policewoman policemen policewomen"
@=@ "poultryboy poultrygirl poultryman poultrywoman poultrymen poultrywomen"
@=@ "preacher preacheress"
@=@ "priest priestess"
@=@ "prince princess"
@=@ "prior prioress"
@=@ "prophet prophetess"
@=@ "proprietor proprietress"
@=@ "protor protectress"
@=@ "ragboy raggirl ragman ragwoman ragmen ragwomen"
@=@ "railroadboy railroadgirl railroadman railroadwoman railroadmen railroadwomen"
@=@ "railwayboy railwaygirl railwayman railwaywoman railwaymen railwaywomen"
@=@ "rainboy raingirl rainman rainwoman rainmen rainwomen"
@=@ "ram ewe billy ewe"
@=@ "rastaboy rastagirl rastaman rastawoman rastamen rastawomen"
@=@ "remainder-boy remainder-girl"
@=@ "remainder-man remainder-woman remainder-men remainder-women"
@=@ "remainderboy remaindergirl remainderman remainderwoman remaindermen remainderwomen"
@=@ "repoboy repogirl repoman repowoman repomen repowomen"
@=@ "rescueboy rescuegirl rescueman rescuewoman rescuemen rescuewomen"
@=@ "ringboy ringgirl ringman ringwoman ringmen ringwomen"
@=@ "schoolmaster schoolmistress"
@=@ "scotsboy scotsgirl scotsman scotswoman scotsmen scotswomen"
@=@ "sculptor sculptress"
@=@ "seaboy seagirl seaman seawoman seamen seawomen"
@=@ "seducer seduceress"
@=@ "seductor seductress"
@=@ "seedsboy seedsgirl seedsman seedswoman seedsmen seedswomen"
@=@ "sempster sempstress"
@=@ "senor senora"
@=@ "serviceboy servicegirl serviceman servicewoman servicemen servicewomen"
@=@ "sewerboy sewergirl sewerman sewerwoman sewermen sewerwomen"
@=@ "shaboy shagirl shaman shawoman shamen shawomen"
@=@ "sheepboy sheepgirl sheepman sheepwoman sheepmen sheepwomen"
@=@ "shellfisherboy shellfishergirl"
@=@ "shellfisherman shellfisherwoman shellfishermen shellfisherwomen"
@=@ "shepherd shepherdess"
@=@ "shirt blouse"
@=@ "shopboy shopgirl shopman shopwoman shopmen shopwomen"
@=@ "showboy showgirl showman showwoman showmen showwomen"
@=@ "silkboy silkgirl silkman silkwoman silkmen silkwomen"
@=@ "singer singeress"
@=@ "sir madam sir ma'am sir damn"
@=@ "sire dam"
@=@ "snowboy snowgirl snowman snowwoman snowmen snowwomen"
@=@ "son daughter"
@=@ "songster songstress"
@=@ "sorcerer sorceress"
@=@ "spokesboy spokesgirl spokesman spokeswoman spokesmen spokeswomen"
@=@ "sportsboy sportsgirl sportsman sportswoman sportsmen sportswomen"
@=@ "stag hind"
@=@ "stallion mare"
@=@ "statesboy statesgirl statesman stateswoman statesmen stateswomen"
@=@ "steer heifer"
@=@ "steersboy steersgirl steersman steerswoman steersmen steerswomen"
@=@ "stepdad stepmom stepfather stepmother stepson stepdaughter"
@=@ "steward stewardess"
@=@ "stuntboy stuntgirl stuntman stuntwoman stuntmen stuntwomen"
@=@ "suitor suitress"
@=@ "sultan sultana"
@=@ "sweat glow"
@=@ "tailor seamstress"
@=@ "talesboy talesgirl talesman taleswoman talesmen taleswomen"
@=@ "talisboy talisgirl talisman taliswoman talismen taliswomen"
@=@ "taskmaster taskmistress"
@=@ "temptor temptress"
@=@ "terminator terminatrix"
@=@ "tiger tigress"
@=@ "toastmaster toastmistress"
@=@ "tod vixen"
@=@ "tom hen"
@=@ "townsboy townsgirl townsman townswoman townsmen townswomen"
@=@ "toyboy toygirl toyman toywoman toymen toywomen"
@=@ "tradesboy tradesgirl tradesman tradeswoman tradesmen tradeswomen"
@=@ "traitor traitress"
@=@ "trencherboy trenchergirl trencherman trencherwoman trenchermen trencherwomen"
@=@ "triggerboy triggergirl triggerman triggerwoman triggermen triggerwomen"
@=@ "tutor tutoress"
@=@ "tzar tzarina"
@=@ "uncle aunt uncle auntie"
@=@ "undies knickers"
@=@ "usher usherette"
@=@ "utilityboy utilitygirl utilityman utilitywoman utilitymen utilitywomen"
@=@ "vampire vampiress"
@=@ "victor victress"
@=@ "villian villainess"
@=@ "viscount viscountess viscount visereine"
@=@ "vixor vixen"
@=@ "votary votaress votary votress votaries votresses"
@=@ "wageboy wagegirl wageman wagewoman wagemen wagewomen"
@=@ "waiter waitress"
@=@ "warder wardess"
@=@ "warrior warrioress warlock witch"
@=@ "washerboy washergirl washerman washerwoman washermen washerwomen"
@=@ "watchboy watchgirl watchman watchwoman watchmen watchwomen"
@=@ "waterboy watergirl waterman waterwoman watermen waterwomen"
@=@ "weighboy weighgirl weighman weighwoman weighmen weighwomen"
@=@ "werewolf wifwolf"
@=@ "whaleboy whalegirl whaleman whalewoman whalemen whalewomen"
@=@ "wheelboy wheelgirl wheelman wheelwoman wheelmen wheelwomen"
@=@ "whoremonger whoremistress"
@=@ "widower widow"
@=@ "wingboy winggirl wingman wingwoman wingmen wingwomen"
@=@ "wiseboy wisegirl wiseman wisewoman wisemen wisewomen"
@=@ "wizard witch"
@=@ "workboy workgirl workman workwoman workmen workwomen"
@=@ "workingboy workinggirl workingman workingwoman workingmen workingwomen"
@=@ "yachtsboy yachtsgirl yachtsman yachtswoman yachtsmen yachtswomen"
@=@ "yardboy yardgirl yardman yardwoman yardmen yardwomen"
@=@ "yes-boy yes-girl yes-man yes-woman yes-men yes-women"
/*"first" names; not a complete list. */
@=@ "Aaron Erin Adam Eve 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 Brian"
@=@ "Rianne Briana Brian 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 Frances Francesca Francesco Francesca"
@=@ "Francis Frances Francis Francine Fred Freda Frederick Fredrica Fredrick Frederica"
@=@ "Gabriel Gabriella Gabriel Gabrielle Gene Jean George Georgia George Georgina Gerald"
@=@ "Geraldine Gerard Gerardette Giovanni Giovanna Glen Glenn Harry Harriet Harry"
@=@ "Harriette Heather Heath Henry Henrietta Horace Horatia Ian Iana Ilija Ilinka Ivan"
@=@ "Ivy Ivo 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 Ken Kendra Kendrick 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 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"
 
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*/
/*(above) [↑] handle lower/uppercase, capitalized, &and plurals.*/
new=
do k=1 for words(old); new=new bendit(word(old,k)); end /*k*/
new=new bendit( word(old,k) ) /*construct a list of "gender" words.*/
end /*k*/
say
call tell new, ' new ' /*show a nicely parseparsed "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.*/
@abcU=@abc || @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</syntaxhighlight>
This REXX program makes use of &nbsp; '''LINESIZE''' &nbsp; REXX program (or BIF) which is used to determine the screen width (or linesize) of the terminal (console).
<br>The &nbsp; '''LINESIZE.REX''' &nbsp; REXX program is included here &nbsp; ──► &nbsp; [[LINESIZE.REX]]. <br>
{{out|output|text=&nbsp; when using the input of: &nbsp; She was a soul stripper. She took my heart!}}
<pre>
───────────────────────────────────────────── old ─────────────────────────────────────────────
She was a soul stripper. She took my heart!
 
────────────────────── There're 2776 words in the gender bender list. ───────────────────────
/*───────────────────────────────────TELL subroutine────────────────────*/
tell: procedure expose sw; parse arg z; z=space(z); $=
say center(arg(2),sw,'─') /*display a formatted header. */
 
───────────────────────────────────────────── new ─────────────────────────────────────────────
do until z==''; parse var z x z; n=$ x
He was a soul stripper. He took my heart!
if length(n)<sw then do; $=n; iterate; end
</pre>
say strip($)
{{out|output|text=&nbsp; when using the default input:}}
$=x
end /*until*/
if strip($)\=='' then say $
say
return
 
/*───────────────────────────────────BENDIT subroutine──────────────────*/
bendit: parse arg x 1 ox; if length(x)==1 then return ox
@abc='abcdefghijklmnopqrstuvwxyz'
parse upper var @abc @abcU pref suff; @abcU=@abc || @abcU
_=verify(x, @abcU, 'M'); if _==0 then return ox
if _\==0 then do; pref=left(x, _-1); x=substr(x,_); end
xr=reverse(x)
_=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 ox
 
if @.x\=='' then return pref || !.x || suff
if !.x\=='' then return pref || @.x || suff
return pref || x || suff
 
/*───────────────────────────────────PROPER subroutine──────────────────*/
proper: arg L1 2; parse arg 2 _2; return L1 || _2
 
/*───────────────────────────────────MANY subroutine────────────────────*/
many: parse arg _; if right(_,1)=='s' then return _ || 'es'
if right(_,1)=='S' then return _ || 'ES'
if datatype(_,'U') then return _'S'
return _'s'</lang>
{{out}}
<pre>
───────────────────────────────────── old ─────────────────────────────────────
Line 549 ⟶ 1,641:
propensity he nourished in his untutored youth.
 
───────────────────────────── There're 5502776 words in the gender bender list. ───────────────
 
───────────────────────────────────── new ─────────────────────────────────────
When a new-hatched savage running wild about hersher 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. HersHer mother was a High
Chiefess, a Queen; hersher auntauntie a High Priestess; and on the paternal side she
boasted uncles who were the husbands of unconquerable warrioresses. There was
excellent blood in hersher veins-royal stuff; though sadly vitiated, I fear, by
the cannibal propensity she nourished in hersher untutored youth.
</pre>
 
=={{header|Ring}}==
<syntaxhighlight lang="ring">
# Project : Reverse the gender of a string
 
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
</syntaxhighlight>
Output:
<pre>
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!
</pre>
 
=={{header|Scala}}==
{{Out}}Best seen running in your browser either by [https://scalafiddle.io/sf/cpBaoMf/0 ScalaFiddle (ES aka JavaScript, non JVM)] or [https://scastie.scala-lang.org/0dajvapgRRChRZaZgpeqnQ Scastie (remote JVM)].
<syntaxhighlight lang="scala">object RevGender extends App {
val s = "She was a soul stripper. She took my heart!"
println(cheapTrick(s))
println(cheapTrick(cheapTrick(s)))
 
def cheapTrick(s: String): String = s match {
case _: String if s.toLowerCase.contains("she") => s.replaceAll("She", "He")
case _: String if s.toLowerCase.contains("he") => s.replaceAll("He", "She")
case _: String => s
}
 
}</syntaxhighlight>
 
=={{header|Sidef}}==
<syntaxhighlight lang="ruby">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}) })
}</syntaxhighlight>
 
Example:
<syntaxhighlight lang="ruby">say reverse_gender("She was a soul stripper. She took my heart!");</syntaxhighlight>
{{out}}
<pre>He was a soul stripper. He took my heart!</pre>
 
=={{header|Tcl}}==
<langsyntaxhighlight lang="tcl"># Construct the mapping variables from the source mapping
apply {{} {
global genderMap genderRE
Line 616 ⟶ 1,884:
string map $genderMap &
]}]
}</langsyntaxhighlight>
Demonstrating:
<langsyntaxhighlight lang="tcl">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
Line 627 ⟶ 1,895:
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."]</langsyntaxhighlight>
{{out}}
<pre>
Line 641 ⟶ 1,909:
blood in her veins-royal stuff; though sadly vitiated, I fear,
by the cannibal propensity she nourished in her untutored youth.
</pre>
 
=={{header|Wren}}==
{{libheader|Wren-str}}
<syntaxhighlight lang="wren">import "./str" for Char
 
var swaps = {
"She": "He", "she": "he", "Her": "His", "her": "his", "hers": "his", "He": "She",
"he": "she", "His": "Her", "his": "her", "him": "her"
}
 
var reverseGender = Fn.new { |sentence|
var newWords = []
for (word in sentence.split(" ")) {
var s = swaps[word]
if (s) {
newWords.add(s)
} else if (Char.isPunctuation(word[-1]) && (s = swaps[word[0..-2]])) {
newWords.add(s + word[-1])
} else {
newWords.add(word)
}
}
return newWords.join(" ")
}
 
var sentences = [
"She was a soul stripper. She took his heart!",
"He was a soul stripper. He took her heart!",
"She wants what's hers, he wants her and she wants him!",
"Her dog belongs to him but his dog is hers!"
]
 
for (sentence in sentences) System.print(reverseGender.call(sentence))</syntaxhighlight>
 
{{out}}
<pre>
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!
</pre>
9,482

edits