Idioteque Graph
Kunal Anand has put together a few fun figures showing the lyrics in popular songs as directed graphs where each node is a unique word in the song. The stopwords have a tendency to form hubs, so I wonder how the graphs would look if he had just filtered them out and passed incoming edges onto the next word in sequence? Less connectedness? More semantically relevant hubs? Visualizing the number of incoming and/or outgoing edges by color or size might also be cool.


7 Responses to “Visualizing Word Sequence in Lyrics”  

  1. 1 Walter

    Looks interesting!

    I worked on a similar project using texts from political parties.

    If you’re interested, take a look:
    http://www.metaportaldermedienpolemik.net/wiki/Wahlprogramme im Vergleich

    (The description is in German but I hope the pictures and the demo speaks for itself)

    Kind regards,
    Walter

  2. 2 k7lim

    across amateur lyric sites, there is some degree of disagreement about a given song’s lyrics. some measure of this phenomenon is due to mishearings, while another factor is whether the artist has published “official” lyrics (and in what format).

    i’d be curious to see a viz for the divergence of people’s lyrics online.

  3. 3 k7lim

    walter, very cool. I’ve always wanted to check out processing. keep us posted on your projects.

  4. 4 bockwurst

    I wrote a quick Python script that generates similar graphs. It reads in and tokenizes the lyrics file the spits out a DOT-format file for GraphViz to chew on. Here’s some sample output generated from the lyrics to Elton John’s “Tiny Dancer”:

    http://hipnik.net/~ivan/pics/elton-tinydancer.png

    No stop-word culling yet, but I label the transitions/edges with the frequency of occurrence.

    The DOT file used to generate that PNG is at:
    http://hipnik.net/~ivan/pics/elton-tinydancer.dot

  5. 5 Ken-ichi

    Gah, you’ve crossed over from spineless blogger to actual creator! Well, crossed back, I guess. Would you mind publishing your code somewhere? I’d like to see how it’s done.

  6. 6 Ivan

    Ken-ichi,

    My code is at http://hipnik.net/~ivan/code/dotGraph/grapher.py
    It’s a Python script that takes in lyrics-style text from stdin and output to stdout.

    Example usage:
    cat lyrics | python grapher.py > dotLyrics.dot

    dotLyrics.dot will then have to be fed to GraphViz (http://graphviz.org)

    Sample output is at:
    http://hipnik.net/~ivan/code/dotGraph/elton-tinydancer.dot

  1. 1 Amoxicillin and alcohol.

Leave a Reply