Alternade words: Difference between revisions
Content added Content deleted
Puppydrum64 (talk | contribs) m (added omits) |
Alpha bravo (talk | contribs) (Added AutoHotkey) |
||
Line 608: | Line 608: | ||
{{output}} |
{{output}} |
||
<lang applescript>{{alternade:"benevolent", subwords:{"belt", "eve", "non"}}, {alternade:"rejuvenate", subwords:{"rune", "eva", "jet"}}}</lang> |
<lang applescript>{{alternade:"benevolent", subwords:{"belt", "eve", "non"}}, {alternade:"rejuvenate", subwords:{"rune", "eva", "jet"}}}</lang> |
||
=={{header|AutoHotkey}}== |
|||
<lang AutoHotkey>FileRead, db, % A_Desktop "\unixdict.txt" |
|||
words := [], sixWords := [] |
|||
for i, w in StrSplit(db, "`n", "`r") |
|||
if (StrLen(w) >= 6) |
|||
sixWords[w] := true |
|||
else |
|||
Words[w] := true |
|||
for w in sixWords |
|||
{ |
|||
w1 := w2 := "" |
|||
for j, letter in StrSplit(w) |
|||
if Mod(j, 2) |
|||
w1 .= letter |
|||
else |
|||
w2 .= letter |
|||
if words[w1] && words[w2] |
|||
result .= w "`t-> " w1 " " w2 "`n" |
|||
} |
|||
MsgBox % result</lang> |
|||
{{out}} |
|||
<pre style="height: 45ex">accost -> acs cot |
|||
accuse -> acs cue |
|||
afield -> ail fed |
|||
agleam -> ala gem |
|||
alcott -> act lot |
|||
allele -> all lee |
|||
allied -> ale lid |
|||
alpert -> apr let |
|||
ambient -> abet min |
|||
annette -> ante net |
|||
apport -> apr pot |
|||
ariadne -> aide ran |
|||
assist -> ass sit |
|||
battle -> btl ate |
|||
blaine -> ban lie |
|||
brenda -> bed rna |
|||
calliope -> clip aloe |
|||
choose -> cos hoe |
|||
choosy -> cos hoy |
|||
claire -> car lie |
|||
collude -> clue old |
|||
effete -> eft fee |
|||
fabric -> fbi arc |
|||
fealty -> fat ely |
|||
fluent -> fun let |
|||
forwent -> fret own |
|||
friend -> fin red |
|||
george -> gog ere |
|||
inroad -> ira nod |
|||
israel -> ire sal |
|||
jaunty -> jut any |
|||
joanne -> jan one |
|||
lounge -> lug one |
|||
oriole -> oil roe |
|||
oswald -> owl sad |
|||
parrot -> pro art |
|||
peoria -> poi era |
|||
pierre -> per ire |
|||
poodle -> pol ode |
|||
pounce -> puc one |
|||
racial -> rca ail |
|||
realty -> rat ely |
|||
sordid -> sri odd |
|||
spatial -> sail pta |
|||
sprain -> sri pan |
|||
strain -> sri tan |
|||
strait -> sri tat |
|||
sturdy -> sud try |
|||
sweaty -> set way |
|||
tattle -> ttl ate |
|||
theorem -> term hoe |
|||
though -> tog huh |
|||
throaty -> tray hot |
|||
triode -> tid roe |
|||
triune -> tin rue |
|||
troupe -> top rue |
|||
truant -> tun rat |
|||
twirly -> til wry</pre> |
|||
=={{header|AWK}}== |
=={{header|AWK}}== |
||
<lang AWK> |
<lang AWK> |