Changeable words
In the list change one letter in word and if new word occur in list then display on this page.
Length of word > 11
Changeable words is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.
Ring
<lang ring> cStr = read("unixdict.txt") wordList = str2list(cStr) num = 0 oldWord = "abc"
ln = len(wordList) for n = ln to 1 step -1
if len(wordList[n]) < 12 del(wordList,n) ok
next
see "working..." + nl see "Changable words are:" + nl
for n = 1 to len(wordList)
len = len(wordList[n]) for m = 1 to len abcList = "abcdefghijklmnopqrstuvwxyz" for abc in abcList str1 = left(wordList[n],m-1) str2 = abc str3 = right(wordList[n],len-m) tempWord = str1 + str2 + str3 ind = find(wordList,tempWord) bool = (ind > 0) and (wordList[n][m] != abc) if bool = 1 and wordList[n] != oldWord num = num + 1 oldWord = tempWord see "" + num + ". " + wordList[n] + " >> " + tempWord + nl ok next next
next
see "done..." + nl </lang> Output:
working... Changable words are: 1. aristotelean >> aristotelian 2. claustrophobia >> claustrophobic 3. committeeman >> committeemen 4. committeewoman >> committeewomen 5. complementary >> complimentary 6. confirmation >> conformation 7. congresswoman >> congresswomen 8. councilwoman >> councilwomen 9. craftsperson >> draftsperson 10. eavesdropped >> eavesdropper 11. frontiersman >> frontiersmen 12. handicraftsman >> handicraftsmen 13. incommutable >> incomputable 14. installation >> instillation 15. kaleidescope >> kaleidoscope 16. neuroanatomy >> neuroanotomy 17. newspaperman >> newspapermen 18. nonagenarian >> nonogenarian 19. onomatopoeia >> onomatopoeic 20. philanthrope >> philanthropy 21. prescription >> proscription 22. schizophrenia >> schizophrenic 23. shakespearean >> shakespearian 24. spectroscope >> spectroscopy 25. underclassman >> underclassmen 26. upperclassman >> upperclassmen done...