Changeable words: Difference between revisions
Content deleted Content added
Alpha bravo (talk | contribs) Added AutoHotkey |
Drkameleon (talk | contribs) Added Arturo implementation |
||
Line 164:
upperclassman <-> upperclassmen
</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}}==
|