Changeable words: Difference between revisions
Content added Content deleted
Alpha bravo (talk | contribs) (Added AutoHotkey) |
Drkameleon (talk | contribs) (Added Arturo implementation) |
||
Line 164: | Line 164: | ||
upperclassman <-> upperclassmen |
upperclassman <-> upperclassmen |
||
</pre> |
</pre> |
||
=={{header|Arturo}}== |
|||
<lang rebol>wordset: map read.lines relative "unixdict.txt" => strip |
|||
wordset: select wordset 'word -> 12 =< size word |
|||
results: new [] |
|||
loop wordset 'a [ |
|||
loop select wordset 'word [equal? size a size word] 'b [ |
|||
if a <> b [ |
|||
if 1 = levenshtein a b [ |
|||
'results ++ @[sort @[a b]] |
|||
] |
|||
] |
|||
] |
|||
] |
|||
loop unique results 'result -> |
|||
print join.with:" - " result</lang> |
|||
{{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|AutoHotkey}}== |
=={{header|AutoHotkey}}== |