0

I am trying to write a query that will return my all CareerStation objects that are associated with Arsenal FC. Then I want to be able to get the start and end dates of these CareerStations, currently I can only get the start date. It may be that only the start date is in the DB but this doesn't make much sense to me. Also I would like to know if there is a way of formatting the date so to remove the parts that aren't the actual year.

Thanks in advance for any pointers.

PREFIX p: <http://dbpedia.org/property/>

select *

where {

    ?careerStation <http://dbpedia.org/ontology/team>     
    <http://dbpedia.org/resource/Arsenal_F.C.> .
    ?careerStation <http://dbpedia.org/ontology/years> ?year

}

order by ?player

Can see query in action here

Stuart Miller
  • 647
  • 3
  • 8
  • I don't think DBPedia contains that information. Any single CareerStation I looked at only has a single date. See an example [here](http://dbpedia.org/resource/Alex_Song__3) – Tomasz Pluskiewicz Feb 03 '16 at 11:07
  • 1
    I think that @TomaszPluskiewicz is right, though one thing that you could do is order the stations by year, and then *assume* that each station ends at the time that the next one begins, and take the beginning of the next as the end of the previous. – Joshua Taylor Feb 03 '16 at 15:29
  • Thanks to both of you for your help. Yes indeed it does seem as though there is only a start data but this seems odd as that field should contain a range. Every instance I have looked at for other instances such of for american football players is the same. It just doesn't make sense to me so I wondered if it is the way it is being formatted to display in HTML and there is a way to access the start and end points of the range.... Very annoying. – Stuart Miller Feb 03 '16 at 16:43
  • I would suggest you bring your feedback regarding the [DBpedia project](http://dbpedia.org/) data to the [DBpedia discussion mailing list](https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion). Also note that the DBpedia data is extracted/converted from Wikipedia data, so changes may be needed at both places... – TallTed Feb 03 '16 at 16:50
  • Okay @TallTed, I will give that a try. I did try to look into how I could get involved and make a change if needed but seemed above my head. To be honest I am not convinced that it is not me misunderstanding how to work with SPARQL. – Stuart Miller Feb 03 '16 at 16:52
  • As to getting the year, and ignoring the remainder of the date information, there are a few techniques you could use within your SPARQL. I suggest you either edit this question to focus there, or ask a new question on this specific topic. – TallTed Feb 03 '16 at 16:53
  • wrt to dates where you expected ranges, it may be an issue with scraping wikipedia. For the example I gave, I noticed that on the player's corresponding [wiki page](https://en.wikipedia.org/wiki/Alex_Song) the senior career section actually contains both dates and ranges. You would really have to raise this issue with DBPedia extraction team – Tomasz Pluskiewicz Feb 03 '16 at 17:31

0 Answers0