Sample word tree search for “love” in Old Ideas album
Visualizing Leonard Cohen’s Word Use In Old Ideas Lyrics
Like word clouds and tag clouds, word trees are a means of graphically viewing word use in a specific text – in this case, the lyrics of the songs on Leonard Cohen’s Old Ideas album. The above graphic show a sample search for the word “love” in that album. At the end of this post is a fully functional, interactive word tree that can be used search for and view specific words in those songs.
From Many Eyes,
A word tree is a visual search tool for unstructured text, such as a book, article, speech or poem. It lets you pick a word or phrase and shows you all the different contexts in which the word or phrase appears. The contexts are arranged in a tree-like branching structure to reveal recurrent themes and phrases.
Using The Word Tree
From Many Eyes,
Unlike most Many Eyes visualizations, the word tree starts with a blank slate instead of a full visualization of the data. You must choose a search term to display a word tree. After a word or phrase is typed, the computer finds all the occurrences of that term, along with the phrases that appear after it. For instance, the word “word” occurs a number of times in the previous paragraphs.
You will notice that in the words following “word” there are many repeated phrases. For instance, “tree” follows “word” five times, and “or phrase” follows three times. To create a word tree, the computer merges all the matching phrases.
You can manipulate the tree in several ways. To zoom into a particular branch, clicking on a word in the tree. If you control-click on a word, the diagram will use that new word as the main search term. And if you wish to see the context occurring before rather than after a phrase, select End. As you navigate the word tree, you can use the Back and Forward buttons just as you would in a browser to quickly step through your history of views.
To point out particular words in the tree, choose Highlight Mode from the menu at the upper right. You can then click to highlight words, or control-click to highlight multiple words. Once you have finished highlighting, choose Clicks Will Zoom from the menu so that you can zoom by clicking.
Unlike many text visualization methods, such as tag clouds, the word tree does not ignore punctuation. In fact, it treats periods, commas and the like as separate words in the text, because within the flow of a text, punctuation can be critical to the meaning and rhythm of the phrases.
By default, the tree branches are ordered from top to bottom by order of occurrence in the text. For instance, if the phrase “we saw” first occurs before “we conquered,” then the “saw” branch will be above the “conquered” branch in the word tree for “we”. You can choose two other modes: alphabetical, or ordered by overall branch size.
The data set includes all lyrics from the songs on Leonard Cohen’s Old Ideas album as found at LeonardCohenFiles. Original spellings have been retained. Titles, credits, and dedications have been excluded. Each instance of repeated words and lines (e.g., a chorus) has been included. Because apostrophes are handled as if they were blank spaces by the software, all apostrophes have been deleted (e.g., “he’s” has been changed to “hes”). Each ampersand has been replaced with “and.” The processed text was then uploaded to Many Eyes, the IBM-sponsored site that collects data sets and creates visualizations of aspects of those data sets.