hitode909の日記

趣味はマリンスポーツですの日記です

全部片手で打てる長い単語を探す

きのう,英単語の綴りの感じを調べるのを作った.

英単語がQWERTY配列上で右か左か調べるやつ作った - hitode909の日記

これを使って,/usr/share/dict/wordsに登場する単語のうち,全部右手か全部左手で打てる長い単語を探した.

All rights

phyllophyllin miminypiminy hypophyllium polyphonium hypolimnion hypophyllum Plynlymmon polyphylly polyphyly homophyly pollinium homophony monophony minikinly nipponium philonium hypophyll okupukupu polyonymy polyphony polyonomy nonillion lupulinum philliloo millpool polyonym kolokolo polonium limonium nymphlin minionly phonikon monopoly homonomy hypopyon homonymy unpinion lollipop illinium Konomihu Koolooly mononymy lulliloo pyolymph Phyllium unmonkly unholily nonunion pililloo poplolly pinolin julolin pillion loukoum mononym molompi phyllin jollily pompion populin lumpily nippily pinhook pinkily homonym limonin lumpkin Minkopi holmium jinjili pulpily Phillip moonily nonoily lupinin lupulin kikumon limpily limpkin munnion pumpkin kokumin hyponym opinion puppily nymphly unplump lollopy linolin kinkily plumply minimum pokomoo mullion unjolly minikin milkily million imonium Kikuyu uploom

All lefts

aftercataract devertebrated tesseradecade tessaradecad reasseverate gazetteerage terracewards settergrass detractress extravasate extravagate Gastraeadae reverberate staggerweed besweatered reaggravate decerebrate bettergates afterbreast aftercareer reaggregate aftereffect vertebrated westerwards exaggerated Evertebrata evertebrate abracadabra abstracter asseverate assertress stewardess grasswards exaggerate waterwards Asteraceae starveacre gravestead refederate defervesce afterwards gravewards aftertaste begartered abstracted exacerbate afterstate aftergrave Aggregatae aftergrass waterstead everbearer regratress asarabacca vertebrate Vertebrata tesserated cataracted breastweed statecraft bedaggered desecrater beggarweed sweetwater freetrader reverbrate extrastate revegetate sweetbread redefecate redecrease ebracteate tradecraft beaverette retraverse desertress stagecraft terracette desertward versecraft estafetted stavesacre badgerweed Trastevere tartarated Actaeaceae effervesce streetward Resedaceae betattered steadfast streetcar traversed traverser streetage scattered terebrate readdress rearwards scarebabe crabeater

どれも指つりそうでよい.phyllophyllinとか調べても何か分からなかったけど,なんなのか.

コードはこんなかんじ.

require './lib/rl'

rl = RL.new

all_lefts = []
all_rights = []
ARGF.each_line{|line|
  term = line.chomp
  l, r = *(rl.detect term)
  all_rights << term if l == 0
  all_lefts << term if r == 0
}

puts '## All rights'
puts '> ' + all_rights.sort_by{|a| -a.length}[0..100].join(' ')
puts
puts '## All lefts'
puts '> ' + all_lefts.sort_by{|a| -a.length}[0..100].join(' ')

rl/rl_stream.rb at master · hitode909/rl · GitHub

追記

全部片手で打てる長い単語を探す - hitode909の日記

all_right と all_left の条件が逆っぽい

2015/01/26 10:38

all_right と all_left の条件が逆っぽい - Sixeight のコメント / はてなブックマーク

逆だったので直した……