Recently, I showed a friend the power of hashes in Perl and the example I gave is counting words. That's a very nifty trick but most people can't imagine a situation in which they would want to count words (every editor does that for them anyway), so I decided to show a good example of how sometimes simple things can come in handy.
The band Bad Religion have a lot of songs, and are known to use heavy words. Listening to them yesterday, I wondered if many of the heavy words repeat themselves. Apparently not. These are the results:
Highest ranking words:
The only words in the top 50 which aren't so basic are time (129) and world (155).
"Heavy" words - 15 characters long or more:
"Heavy" words which actually repeat themselves:
This was fun. I'll try to upload the technicalities of how I did all the calculation in future posts.
Back when I was in High School one of my english classes gave us extra credit every week if we had any new words that we had learned that week and we could show where we learned them. Bad Religion was the source of a lot of extra credit for me
Re:treasure trove of words
Lecar_red on 2009-04-14T16:07:30
That is great story!
BR is a great inspiration for a rich vocab and for thinking.
How about your hash, with each key a word, and each primary value a hash, with keys of 'occurences' (as before- the value the # of times the word occurs) and "songs", with the value being a hash of the song titles (keys) and the number of times occurring in that song (value).
Re:Another example
baest on 2009-04-21T05:47:01
Or removing duplicates from a list