nanogenmo
a nano-nanogenmo entry:
cat 4300-0.txt 2814-0.txt|python3 -c "import sys,re;w=set(re.split(r'[^A-Za-z\'’.\-,?\!;:]',sys.stdin.read()));l=['Once']
while w:l.append(min(w,key=lambda x:len(set(x)^set(l[-1]))));w.remove(l[-1])
print('DUBLIN WALK\nMartin O\'Leary\n\n'+' '.join(l))"
walks through joyce's ulysses and dubliners, picking words with similar spelling to the previous word
output: https://gist.github.com/mewo2/3e6ad222e516367ada96fbd8c9a1106d
(cc @nickmofo)
nanogenmo
@mewo2 yo. this is great
nanogenmo
@mewo2 Beautiful! I ran it on ... well, one of the two texts should be pretty obvious ... with great results!
nanogenmo
@nickmofo yep, that looks right! I wrote a little explanation on the github page: https://github.com/NaNoGenMo/2019/issues/102#issuecomment-557241631
nanogenmo
@mewo2 Ha! well, I guess that was really for my own sake anyway
nanogenmo
@mewo2 @nickmofo omg I love this