title: Get a parent category for wikipedia articles
body: <p>I have a list of wikipedia users and the articles that they edited.<br>
  I'm trying to build a hierarchical profile for each one of them.</p>
  
  <p>The problem is i'm struggling to get parent categories for each article.<br>
  What I want is for example is for an article about Pizza to get "dishes" or "food".<br>
  I'm using jena and Yago and a simple SPARQL query who looks like this:  </p>
  
  <pre><code>String sparqlQueryString = "BASE &lt;http://yago-knowledge.org/resource/&gt;"
                  + "PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; "
                  + "SELECT ?supercat WHERE { "
                  + "&lt;" + child + "&gt;" + " rdf:type ?supercat . "
                  + "}";
  </code></pre>
  
  <p>(Where child here is the article)<br>
  So i wanted to ask if somebody knew how to get a correct  parent category from that. And also, if it's possible or if anyone has ideas about ordering all the titles of the articles and their parents into a hierarchic user interests profile.  </p>