On simple stuff and bad religions

xsawyerx on 2009-04-14T10:32:14

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 (1681)
  • And (1181)
  • A (974)
  • To (935)
  • Of (704)
  • I (542)
  • In (499)
  • Is (421)
  • It (393)
  • You (836)
  • All (306)
  • But (261)
  • ...

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:

  • Omni-directional
  • transubstantiation
  • phylogenetically

"Heavy" words which actually repeat themselves:

  • repercussions - 13 chars, 4 times
  • regurgitate - 11 chars, 6 times
  • materialist - 11 chars, 7 times
However, the point to consider with it is that some words repeat more than one in specific songs, like repeating verse or choruses.

This was fun. I'll try to upload the technicalities of how I did all the calculation in future posts.


treasure trove of words

mpeters on 2009-04-14T12:22:55

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.

primary hash of hashes

mw487 on 2009-04-14T16:01:45

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).

This, my friend...

educated_foo on 2009-04-15T02:39:21

Is why God invented stop words.

Another example

grantm on 2009-04-15T09:35:13

Another example that people may be able to relate to, is scanning an Apache log file and using the hash to count which pages were visited.

Re:Another example

baest on 2009-04-21T05:47:01

Or removing duplicates from a list