Visualize locations mined from the latest news

February 3rd, 2011, By eitanb

Check out this quick way to extract places from the news and put them on a map.

Locations mentioned in the news regarding Natalie Portman:

Locations mentioned in the news regarding Global Warming:

Locations mentioned in the news regarding Weapons of Mass Destruction:

This can be done in an extremely easy way, on ANY collection of words – using this query:
http://api.headup.com/v1?raw=true&q=Wikileaks/yahooboss:allabstractstext/x:entity/aspage(“map”)

If we break the query apart, here’s what we get:

  • ANY_COLLECTION_OF_WORDS_YOU_LIKE/yahooboss:allabstractstext – brings text of abstracts from Yahoo! BOSS for the collection of words.
  • /x:entity – Extracts the entities from this text, using SemantiNet’s entity extraction engine.
  • /aspage(‘map’) – renders entities on a map. This is done by trying to reason what is the location of each entity – and put them as markers on a simple Google Map.

We’ve quickly devised another template, to see the text right by the map, for easy playing around:

http://api.headup.com/v1?raw=true&q=summer olympics/aspage(“example/text_and_entities_on_map_1.html”)

As can be seen – the extracted entities from the news are sometimes only remotely related to the topic itself. Still, it’s quite fun for playing around :)

Keith Richards’ guitar gallery in 4 lines of code

January 24th, 2011, By eitanb

The first line of “code” would be this query, that returns a list of Keith Richards’s guitars (click to check it out):
http://api.headup.com/v1?raw=true&q=Keith Richards/popularmeaning/`instrument`/render(“videolist.html”)
Let’s break down the query to its parts:

  • Keith Richards/popularmeaning – gives us the URI (a unique ID) for Keith Richards, dbpedia:Keith_Richards.
  • `instrument` – that’s a fuzzy matching of the free-form text “instrument” with a predicate of dbpedia:Keith_Richards. We get a list of the instruments that Keith played.
  • Then we render this list of instruments as using a template (that we’ve prepared in advance) called videolist.html.
This is actually a more “fuzzy” way of querying the graph. The strict way of querying it would have been:
http://api.headup.com/v1?raw=true&q=dbpedia:Keith_Richards/dbpedia-owl:instrument/render(“videolist.html”)

The rest of the code resides inside the videolist.html template. Let’s have a look inside:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>SemantiNet's Video Portal</title>
  <link rel="stylesheet" href="http://www.blueprintcss.org/blueprint/screen.css">
  <style type="text/css" media="screen">
  body {background-color: #FAFAFF}
  </style>
</head>
<body>
 <div class="container">
 <div class="span-24">
  <table style="font-family: Consolas; font-size: x-small; background-color: white" class="span-24">
   <%foreach ./take(20)%>
  <tr width="100%">
   <td>
    <%select keytermsforquery/youtube:getplayers/first%>
   <iframe title="YouTube video player" class="youtube-player" type="text/html" width="300" height="230" src="http://www.youtube.com/embed/<%= f:v1/split('/')/*/at(4)%/>" frameborder="0">
   </iframe>
    </%select%>
   </td>
   <td>
   <h2><%= label%/></h2>
    <%= abstract/str:unescapeunicode%/>
   </td>
  </tr>
   </%foreach%>
  </table>
 </div>
 </div>
</body>
</html>

Most of the template is made of simple HTML markup. The query lines are:

  • keytermsforquery/youtube:getplayers/first
    • keytermsforquery - query refinements, for making calls to search APIs (YouTube in this case) –  adds semantic “cues” when querying APIs to get more accurate results.
    • youtube:getplayers – gets YouTube players for the entities.
    • Take only the first video, we want 1 for each instrument.
  • label – brings a nice readable name.
  • abstract/str:unescapeunicode – brings the Wikipedia abstract – and removes Unicode escaping.
In the same way, we can display a nice YouTube gallery of any list we’d like:

Queries of the day – some simple ones to start with

January 19th, 2011, By eitanb

Here are some quick ways to query “World Knowledge” information using SemantiNet’s API, in a very basic way.

Let’s break it down a bit:

  1. dbpedia:New_Zealand – brings the node in the graph that represents New Zealand. How did we know to put an “_”? DBPedia matches Wikipedia’s URLs, and New Zealand’s Wikipedia entry resides under http://en.wikipedia.org/wiki/New_Zealand. We used Google to find how New Zealand appears in Wikipedia.
  2. We added a “label” to it, in order to get a nice representation of it.
  3. dbpedia-owl:capital – gets New_Zealan’s capital.
  4. latlong – get the coordinates of the capital.

Of course that we can run similar ones:

Notice that Linked-Data (including Wikipedia) contain over 1 Billion(!) facts, so these simple queries actually give access to quite a bunch of data.

Want to play around? Give it a spin: http://www.headup.com/playground.php

Or, check out the documentation in the wiki: http://wiki.headup.com/index.php?title=Knowledge_Graph_API

The Softer Side of “The World’s Toughest Movie Critic”

March 17th, 2010, By talk
Vaughn Fry - He's Tough on Movies!

Vaughn Fry - He's Tough on Movies!

My guest for our blogger interview this week chose the words “World’s Toughest Movie Critic” as his personal tagline.

He’s a film major graduate of the University of Kansas.

He’s fiercely proud of the Mid-Western culture and community he belongs to.

For the past few years he’s been volunteering as a Programmer for the Tallgrass Film Festival.

It is with great pleasure that I introduce you to Vaughn Fry, the video blogging film critic responsible for the excellent Vaughn On Movies blog.

Mike:

Hi Vaughn! Great having you as my guest today. How are you?

Vaughn:

I’m doing fine. Beginning to get my bearings using Skype.

Mike:

I have to ask.
Why do you figure you’re the “World’s Toughest Movie Critic”?

Vaughn:

My tagline is my reaction to a trend in the film-review blogging community were bloggers sing the praises of anything the studios throw at them regardless of its quality, in the hope of getting noticed and currying favor.

Mike:

Isn’t it natural for a relationship to develop within any industry between the various stake holders?

As far as I know bloggers are usually very honest and open about the little perks, invitations and freebies that come their way and most of them maintain a very obvious disclosure policy whenever they write reviews where their objectivity may be suspect.

Vaughn:

I respect that, and it may be a fact of life, but for myself I like to maintain tough standards.

I write to represent the little guy. I want  my audience to be fickle. I don’t want people accepting everything Hollywood dishes out as “Movie Gospel”. I want them to develop a sensitivity for what’s worthy and what’s not.

As far as the material gains go in terms of the perks, the VIP invitations, the gala openings and parties –  I guess I’m immune by force, as much as by choice.

The simple fact I’m located in Kansas, far away from the so called “Cultural Centers” on the coasts, saves me the effort of considering how a scathing review I publish might affect my standing with the studios, or my chances to be part of the “in” crowd. My location makes me for all purposes “Untouchable”.

Mike:

It would seem you’ve transformed adversity into opportunity.

Vaughn:

De facto, yes. But it’s more than just a question of necessity.
I wouldn’t want to be part of a culture that bows to the commercial aspects of movie making and advertising, regardless of where  I live.

Mike:

So if your location isn’t the reason you choose to be “tough”, one might ask whether it has any effect on your endeavors at all?

Vaughn:

Absolutely!

Choosing to remain in Kansas after graduation meant that I had precious few existing opportunities for pursuing my passion for film.

I turned to blogging because I realized that if I didn’t create the channel for broadcasting my opinions, I’d remain mute – plain and simple!

Mike:

It would seem that your choices have played out well for you.
I checked your Twitter page – you’re followed by over 14,000 people!

Vaughn:

I’ve been very persistent building my Twitter following because I think its key to driving traffic to my site and Youtube channel.

Sometimes late at night, when I’m sitting alone and tired in the dark of my basement after finishing a video review, I scheme and plot for the day my army of followers forces the major media channels to notice my content and recognize its value.
That’s usually the point where I decide it might be a good time to turn in for the night….(laughing)

Mike:

I dig that. It’s a “First we take Twitter then we take LA” kinda thing.
So your motivation is world domination?

Vaughn:

Exactly!

Seriously though, being so far off center and doing what I do is a real challenge. I think that in many respects rising to that challenge and proving to myself I can beat these odds is a key motivator for me to keep on doing what I’m doing.

I’d like to be able to look back one day and know my efforts perhaps inspired action from others in my community.

I think I’m very fortunate to live in an age where technology enables anyone, from any background, to go out there produce quality video content and distribute it on a scale that’s limited only by the extent of one’s skill and daring.

Sometimes I think of this entire endeavor as an evolution of my childhood passion for video games:
As a kid I was always looking to beat my last “High Score”, today my challenge is getting more views for my content.

Mike:

That’s a very interesting way of looking at it and definitely one I can identify with. I guess I feel pretty much the same every time I check how many times our widget has been downloaded…

So what’s next for you?
When will you feel you’ve “Beat the Game”?

Vaughn:

I  truly believe video is the natural evolution for film criticism so I’d love to be recognized as a YouTube partner.

Other than that it would be great to get an offer to do something on TV, or receive a buyout offer for the blog.
In either case it would have to be a situation where I’d be certain my creative boundaries would be respected.



The future of film criticism

Mike:

I’ve got my fingers crossed for you man!

I’m curious that despite your involvement with the Tallgrass festival you only review big commercial productions.
Why is that?

Vaughn

It’s true.
Although my job as Festival Programmer requires me to watch over 300 foreign and independent films every year, I prefer writing about mainstream Hollywood pictures on my blog for two reasons:

  1. From a pragmatic perspective I doubt most people would bother to visit a blog dedicated to esoteric and niche movies.
  2. As Festival Programmer I’m limited in terms of what I’m allowed to expose and when. By the time it’s O.K. to write about a movie I saw at a  pre-screening, I’ve usually forgotten so much it’s impossible to write a review.

Anyway I think there’s something healthy about keeping these activities separate:
The festival is a volunteer operation. It’s  my way of giving back to my community.
The blog is a venture and I’m waiting to see how it plays out.

Mike:

I must admit that it definitely makes sense.

I’d like to change the subject and get your angle on our widget.

Vaughn:

I think it’s a very powerful widget. The only thing I’ve seen similar to it  is the way you can highlight stuff when using Bing’s.

I like it because it gives my readers access to all the information they might need, when they need it, and in one spot.
It takes the “work” out of research.

From a writer’s perspective it gives me the confidence that no matter what I write about, or whom, the widget has my back covered.
I no longer need worry about the tedious labor of providing links to references and explanations.

I think it’s very useful!

Mike:

Wow Vaughn!
Thanks for the compliments!

I really appreciate the fact you’re willing to help us with your feedback and support and I wish  you the best of luck with your blog. Cheers,

Vaughn:

No problem – I look forward to seeing what you come up with next…

Older Posts »