Tokyo | Cairo: Comparing Obama’s Foreign Policy Speeches

Tokyo | Cairo: Comparing Obama's Foreign Policy Speeches

I spent a little bit of time today working on my text comparison tool, which I built last weekend to satisfy my curiosity about the similarities and differences between two very similar articles published on head injuries in the NFL (you can read the post here). I wanted to test out the tool with a different kind of content, and settled on something more political: two high profile foreign policy speeches by US President Barack Obama.

The first speech is Obama’s famous open address to the Muslim world, given in July at the University of Cairo. The second is much more recent – yesterday’s speech delivered at the Suntory Hall in Tokyo. As you might expect, the two speeches share a lot of common language. Here is the big picture, showing the top 100 words:

Tokyo | Cairo: Comparing Obama's Foreign Policy Speeches

The shared words – ‘america’,’world’,’common’,’human’,’responsibility’, ect don’t offer much in the way of analysis. Things start to get interesting, though, when we look towards the edges (click on the images to see larger versions):

Tokyo | Cairo: Comparing Obama's Foreign Policy Speeches Tokyo | Cairo: Comparing Obama's Foreign Policy Speeches

At the far extremes, the speech in Cairo was about Islam, about Palestinians, about peace, faith, and communities. The Tokyo address was about China, North Korea, security, agreement and growth. If we look at some of the common words that were used in both speeches, we can see some more interesting patterns emerge.

It seems, for instance that the Egyptian address was more about people, whereas the speech in Tokyo was directed towards nations:

Tokyo | Cairo: Comparing Obama's Foreign Policy Speeches

Obama makes many more mentions about peace in Cairo (in Japan, this word seems to have been replaced by ‘security’), and far more mentions of prosperity in Tokyo:

Tokyo | Cairo: Comparing Obama's Foreign Policy Speeches

There was a lot of speculation prior to Obama’s speech in Asia about how much focus the President would put on human rights. In the speech, Obama mentions ‘rights’ only five times – once at the beginning of the speech and four times near the end. This weighting is interesting when we compare it to Obama’s reference to China during the speech, which is heavily concentrated at the beginning (China is not mentioned at all past the half-way point of the speech):

Tokyo | Cairo: Comparing Obama's Foreign Policy Speeches

Though one of the five occurrences of ‘rights’ is in reference to China, it appears from this analysis that there may have been a deliberate plan to keep the ‘human rights part’ of the speech separated from the ‘China part’.

There likely many interesting things in this data set, a lot of which are open to interpretation. While it’s doubtful that one can steer entirely clear of political biases during this kind of comparison, the quantitative nature of the data makes it a little bit easier to make an attempt at nonpartisan analysis. I will be including these speeches as sample texts when I release the tool to the public (hopefully next week).

12 thoughts on “Tokyo | Cairo: Comparing Obama’s Foreign Policy Speeches

  1. Hi, Looked at this post about a text comparison tool. Lawyers spend a lot of time comparing slabs of text. I should know, I'm a lawyer ! The tool could have applications for lawyers. I'll await the next or improved release.

    1. Hi John,

      I hadn't considered the legal world when I built his but of course I can see how it might be useful! If there are any specific features that you think would be useful, let me know.

  2. Pretty darned cool .. need to sit and think about how this can be made useful in several contexts.

    is it OS. Will you be making it available to others to use, and if so under what type(s) of arrangement(s) ?

    1. Hi John,

      Yes, it will be released soon with an open source license. Typically my only request is that if the code gets used there is an attribution when the work is published.

  3. Hi Jer,
    your tool looks suitable to be used in qualitative research analyzing interview data. I.e. in the grounded theory approach you delineate concepts from data to build substantive or formal theory. There are QDA system available but your way of visually comparing two stories looks intriguing.
    I'm really eager to see your release!

  4. Hi, I saw your work in Gemalto magazine. Impressive!

    I'd try your tool for one author's corpus of texts (poetry). (The right half of the drawing, turned right). Really interesting.

  5. Hi Andrew,

    The horizontal positions are calculated by averaging the weights of the words in each article. So, yes, there is some adjustment for the size of the article.

    The vertical positions are an average of all of the location of the word in the articles – I calculate the average location for each word in each text then average the two to get the overall position.

    When a word is focused, you see the 'cords' showing theoccurrenceof the words in each text. These cords show up lighter when no individual word is focused. My intent with these 'bundles' was to give some general idea of where each word occurs in the texts – this information can easily be lost when all of the averaging is done.

    Does that make sense?


  6. Hi,blprnt_van
    I have done this. 825fc_o.png
    you build with Processing v1.0
    but I build with Qt 4.6.0
    Thanks for your inspiration.
    I may take this as an embryonic idea of My dissertation.

  7. Hi Jer, I liked your work so much that I went ahead and built a clone:
    I hope you don't mind. As this is my first Processing sketch I kept close to your example and was grateful to 'know' up front how things should work out. Would not have been able to do it without such help. I'll use it to analyse interview data in qualitative research. As you are it's 'godfather' I thought I let you know that you have been a real inspiration. Thank you!

  8. Hi, I saw your work in Gemalto magazine. Impressive!

    I'd try your tool for one author's corpus of texts (poetry). (The right half of the drawing, turned right). Really interesting.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>