Changeable words: Difference between revisions

no edit summary
No edit summary
 
(3 intermediate revisions by 3 users not shown)
Line 138:
claustrophobia <-> claustrophobic
committeeman <-> committeemen
committeewoman <-> committeewomen
committeeperson <-> committeepeople
complementary <-> complimentary
confirmation <-> conformation
congresswoman <-> congresswomen
congressperson <-> congresspeople
councilpersoncouncilwoman <-> councilpeoplecouncilwomen
craftsperson <-> draftsperson
eavesdropped <-> eavesdropper
Line 439:
committeeman committeemen
committeemen committeeman
committeewoman committeewomen
committeeperson committeepeople
committeewomen committeewoman
committeepeople committeeperson
complementary complimentary
complimentary complementary
confirmation conformation
conformation confirmation
congresswoman congresswomen
congressperson congresspeople
congresswomen congresswoman
congresspeople congressperson
councilwoman councilwomen
councilperson councilpeople
councilwomen councilwoman
councilpeople councilperson
craftsperson draftsperson
draftsperson craftsperson
Line 584:
5: committeeman -> committeemen
6: committeemen -> committeeman
7: committeepersoncommitteewoman -> committeepeoplecommitteewomen
8: committeepeoplecommitteewomen -> committeepersoncommitteewoman
9: complementary -> complimentary
10: complimentary -> complementary
11: confirmation -> conformation
12: conformation -> confirmation
13: congresspersoncongresswoman -> congresspeoplecongresswomen
14: congresspeoplecongresswomen -> congresspersoncongresswoman
15: councilpersoncouncilwoman -> councilpeoplecouncilwomen
16: councilpeoplecouncilwomen -> councilpersoncouncilwoman
17: craftsperson -> draftsperson
18: draftsperson -> craftsperson
Line 691:
5: committeeman -> committeemen
6: committeemen -> committeeman
7: committeepersoncommitteewoman -> committeepeoplecommitteewomen
8: committeepeoplecommitteewomen -> committeepersoncommitteewoman
9: complementary -> complimentary
10: complimentary -> complementary
11: confirmation -> conformation
12: conformation -> confirmation
13: congresspersoncongresswoman -> congresspeoplecongresswomen
14: congresspeoplecongresswomen -> congresspersoncongresswoman
15: councilpersoncouncilwoman -> councilpeoplecouncilwomen
16: councilpeoplecouncilwomen -> councilpersoncouncilwoman
17: craftsperson -> draftsperson
18: draftsperson -> craftsperson
Line 913:
claustrophobia <-> claustrophobic
committeeman <-> committeemen
committeewoman <-> committeewomen
committeeperson <-> committeepeople
complementary <-> complimentary
confirmation <-> conformation
congresswoman <-> congresswomen
congressperson <-> congresspeople
councilwoman <-> councilwomen
councilperson <-> councilpeople
craftsperson <-> draftsperson
eavesdropped <-> eavesdropper
Line 1,004:
committeeman ---> committeemen
committeemen ---> committeeman
committeepersoncommitteewoman ---> committeepeoplecommitteewomen
committeepeoplecommitteewomen ---> committeepersoncommitteewoman
complementary ---> complimentary
complimentary ---> complementary
confirmation ---> conformation
conformation ---> confirmation
congresspersoncongresswoman ---> congresspeoplecongresswomen
congresspeoplecongresswomen ---> congresspersoncongresswoman
councilpersoncouncilwoman ---> councilpeoplecouncilwomen
councilpeoplecouncilwomen ---> councilpersoncouncilwoman
craftsperson ---> draftsperson
draftsperson ---> craftsperson
Line 1,220:
5: committeeman -> committeemen
6: committeemen -> committeeman
7: committeepersoncommitteewoman -> committeepeoplecommitteewomen
8: committeepeoplecommitteewomen -> committeepersoncommitteewoman
9: complementary -> complimentary
10: complimentary -> complementary
11: confirmation -> conformation
12: conformation -> confirmation
13: congresspersoncongresswoman -> congresspeoplecongresswomen
14: congresspeoplecongresswomen -> congresspersoncongresswoman
15: councilpersoncouncilwoman -> councilpeoplecouncilwomen
16: councilpeoplecouncilwomen -> councilpersoncouncilwoman
17: craftsperson -> draftsperson
18: draftsperson -> craftsperson
Line 1,351:
5: committeeman -> committeemen
6: committeemen -> committeeman
7: committeepersoncommitteewoman -> committeepeoplecommitteewomen
8: committeepeoplecommitteewomen -> committeepersoncommitteewoman
9: complementary -> complimentary
10: complimentary -> complementary
11: confirmation -> conformation
12: conformation -> confirmation
13: congresspersoncongresswoman -> congresspeoplecongresswomen
14: congresspeoplecongresswomen -> congresspersoncongresswoman
15: councilpersoncouncilwoman -> councilpeoplecouncilwomen
16: councilpeoplecouncilwomen -> councilpersoncouncilwoman
17: craftsperson -> draftsperson
18: draftsperson -> craftsperson
Line 1,470:
 
aristotelean <=> aristotelian claustrophobia <=> claustrophobic
committeeman <=> committeemen committeepersoncommitteewoman <=> committeepeoplecommitteewomen
complementary <=> complimentary confirmation <=> conformation
congresspersoncongresswoman <=> congresspeoplecongresswomen councilpersoncouncilwoman <=> councilpeoplecouncilwomen
craftsperson <=> draftsperson eavesdropped <=> eavesdropper
frontiersman <=> frontiersmen handicraftsman <=> handicraftsmen
Line 1,536:
 
Found 52 changeable words.</pre>
 
=={{header|Pascal}}==
==={{header|Free Pascal}}===
<syntaxhighlight lang="pascal">
{$mode ObjFPC}{$H+}
uses
Classes, SysUtils;
 
const
FNAME = 'unixdict.txt';
 
function OneCharDifference(s1, s2: string): boolean;
var
i, diffCount: integer;
begin
diffCount := 0;
if Length(s1) <> Length(s2) then
Exit(false);
for i := 1 to Length(s1) do
begin
if s1[i] <> s2[i] then
Inc(diffCount);
if diffCount > 1 then
Exit(false);
end;
Result := diffCount = 1;
end;
 
procedure PurgeList(var list: TStringList);
{ Remove every word that doesn't have at least 12 characters }
var
i: Integer;
begin
for i := Pred(list.Count) downto 0 do
if Length(list[i]) < 12 then
list.Delete(i);
end;
 
var
list: TStringList;
i, j: Integer;
 
begin
list := TStringList.Create;
try
list.LoadFromFile(FNAME);
PurgeList(list);
for i := 0 to list.Count - 2 do
for j := i + 1 to list.Count - 1 do
if OneCharDifference(list[i], list[j]) then
writeln(list[i]:15, ' <-> ', list[j]);
finally
list.Free;
end;
end.
</syntaxhighlight>
{{out}}
<pre>
aristotelean <-> aristotelian
claustrophobia <-> claustrophobic
committeeman <-> committeemen
committeewoman <-> committeewomen
complementary <-> complimentary
confirmation <-> conformation
congresswoman <-> congresswomen
councilwoman <-> councilwomen
craftsperson <-> draftsperson
eavesdropped <-> eavesdropper
frontiersman <-> frontiersmen
handicraftsman <-> handicraftsmen
incommutable <-> incomputable
installation <-> instillation
kaleidescope <-> kaleidoscope
neuroanatomy <-> neuroanotomy
newspaperman <-> newspapermen
nonagenarian <-> nonogenarian
onomatopoeia <-> onomatopoeic
philanthrope <-> philanthropy
prescription <-> proscription
schizophrenia <-> schizophrenic
shakespearean <-> shakespearian
spectroscope <-> spectroscopy
underclassman <-> underclassmen
upperclassman <-> upperclassmen
</pre>
 
=={{header|Perl}}==
<syntaxhighlight lang="perl">#!/usr/bin/perl
Line 1,559 ⟶ 1,645:
claustrophobia <-> claustrophobic
committeeman <-> committeemen
committeepersoncommitteewoman <-> committeepeoplecommitteewomen
complementary <-> complimentary
confirmation <-> conformation
congresspersoncongresswoman <-> congresspeoplecongresswomen
councilpersoncouncilwoman <-> councilpeoplecouncilwomen
craftsperson <-> draftsperson
eavesdropped <-> eavesdropper
Line 1,582 ⟶ 1,668:
underclassman <-> underclassmen
upperclassman <-> upperclassmen
</pre> =={{header|Perl}}==Alternatively:
<syntaxhighlight lang="perl">#!/usr/bin/perl
 
Line 1,715 ⟶ 1,801:
5: committeeman -> committeemen
6: committeemen -> committeeman
7: committeepersoncommitteewoman -> committeepeoplecommitteewomen
8: committeepeoplecommitteewomen -> committeepersoncommitteewoman
9: complementary -> complimentary
10: complimentary -> complementary
11: confirmation -> conformation
12: conformation -> confirmation
13: congresspersoncongresswoman -> congresspeoplecongresswomen
14: congresspeoplecongresswomen -> congresspersoncongresswoman
15: councilpersoncouncilwoman -> councilpeoplecouncilwomen
16: councilpeoplecouncilwomen -> councilpersoncouncilwoman
17: craftsperson -> draftsperson
18: draftsperson -> craftsperson
Line 1,817 ⟶ 1,903:
claustrophobia From claustrophobic
committeeman From committeemen
committeepersoncommitteewoman From committeepeoplecommitteewomen
complementary From complimentary
confirmation From conformation
congresspersoncongresswoman From congresspeoplecongresswomen
councilpersoncouncilwoman From councilpeoplecouncilwomen
craftsperson From draftsperson
eavesdropped From eavesdropper
Line 1,927 ⟶ 2,013:
2: claustrophobia <-> claustrophobic
3: committeeman <-> committeemen
4: committeepersoncommitteewoman <-> committeepeoplecommitteewomen
5: complimentary <-> complementary
6: confirmation <-> conformation
7: congresspersoncongresswoman <-> congresspeoplecongresswomen
8: councilpersoncouncilwoman <-> councilpeoplecouncilwomen
9: draftsperson <-> craftsperson
10: eavesdropped <-> eavesdropper
Line 2,001 ⟶ 2,087:
committeeman committeemen
committeemen committeeman
committeepersoncommitteewoman committeepeoplecommitteewomen
committeepeoplecommitteewomen committeepersoncommitteewoman
complementary complimentary
complimentary complementary
confirmation conformation
conformation confirmation
congresspersoncongresswoman congresspeoplecongresswomen
congresspeoplecongresswomen congresspersoncongresswoman
councilpersoncouncilwoman councilpeoplecouncilwomen
councilpeoplecouncilwomen councilpersoncouncilwoman
craftsperson draftsperson
draftsperson craftsperson
Line 2,097 ⟶ 2,183:
5. committeeman >> committeemen
6. committeemen >> committeeman
7. committeewoman >> committeewomen
7. committeeperson >> committeepeople
8. committeewomen >> committeewoman
8. committeepeople >> committeeperson
9. complementary >> complimentary
10. complimentary >> complementary
11. confirmation >> conformation
12. conformation >> confirmation
13. congresspersoncongresswoman >> congresspeoplecongresswomen
14. congresspeoplecongresswomen >> congresspersoncongresswoman
15. councilpersoncouncilwoman >> councilpeoplecouncilwomen
16. councilpeoplecouncilwomen >> councilpersoncouncilwoman
17. craftsperson >> draftsperson
18. draftsperson >> craftsperson
Line 2,290 ⟶ 2,376:
5: committeeman -> committeemen
6: committeemen -> committeeman
7: committeepersoncommitteewoman -> committeepeoplecommitteewomen
8: committeepeoplecommitteewomen -> committeepersoncommitteewoman
9: complementary -> complimentary
10: complimentary -> complementary
11: confirmation -> conformation
12: conformation -> confirmation
13: congresspersoncongresswoman -> congresspeoplecongresswomen
14: congresspeoplecongresswomen -> congresspersoncongresswoman
15: councilpersoncouncilwoman -> councilpeoplecouncilwomen
16: councilpeoplecouncilwomen -> councilpersoncouncilwoman
17: craftsperson -> draftsperson
18: draftsperson -> craftsperson
Line 2,422 ⟶ 2,508:
5 committeeman committeemen
6 committeemen committeeman
7 committeepersoncommitteewoman committeepeoplecommitteewomen
8 committeepeoplecommitteewomen committeepersoncommitteewoman
9 complementary complimentary
10 complimentary complementary
11 confirmation conformation
12 conformation confirmation
13 congresspersoncongresswoman congresspeoplecongresswomen
14 congresspeoplecongresswomen congresspersoncongresswoman
15 councilpersoncouncilwoman councilpeoplecouncilwomen
16 councilpeoplecouncilwomen councilpersoncouncilwoman
17 craftsperson draftsperson
18 draftsperson craftsperson
45

edits