0

I currently have a huge list of DBpedia pages of which I need corresponding data to be extracted (mainly dct:subject) from their respective pages. So for example, for the Android_TV page I need the following data (under dct:subject) to be returned as text:

  • dbc:Smart_TV
  • dbc:2014_software
  • dbc:Google_software
  • dbc:Android_(operating_system)
  • dbc:Natural_language_processing_software

Now I know how to manually query this of course, but since I have a huge amount of these pages to query I need to find a way to do this automatically and have all this extracted information stored somehow. I of course have done a lot of searching on Google as well as Google Scholar, but I'm quite stuck.

Could anyone point me in the right direction? Any useful papers / websites / explanations you might know of are very welcome! Thanks in advance! :)

Knarf
  • 137
  • 1
  • 12
  • 1
    This question is unclear to me. What do you mean by "automatically"? You already have the SPARQL query, right? Either you run a script like a Python script and run the query for each resource (what you call DBpedia page - in fact, this isn't a page...). Or you use the SPARQL 1.1 `values` clause, like `SELECT ... { values ?s { ... } ?s dct:subject ?subject }` – UninformedUser Feb 21 '18 at 14:38
  • What I mean is that I have a list of different pages in the following form: /page/Android_TV. Now for each of those pages I need their dct:subject information extracted. With automatically I mean that it's just too many pages to do by hand, so like you said I need some way to program this in Python. I just talked with my professor and he gave me the same two methods as you just did haha. Apparantly there is this python RDF library I can use for this, so I'm going to look into that now! Thanks for the suggestions :) – Knarf Feb 21 '18 at 14:45
  • Ok. Just as a comment: `/page/Android_TV` is just the HTML rendering of the RDF resource. For information lookup, you have to use the proper RDF URI, i.e. `/resource/Android_TV` – UninformedUser Feb 21 '18 at 15:14
  • Maybe you are likely looking for parameterized queries in Sparql like this?https://stackoverflow.com/questions/8422401/sparql-parameterized-queries – Erwarth Feb 21 '18 at 16:28
  • How large is your list? Perhaps items of this list have something in common? For example, they are instances of `dbo:Device`? – Stanislav Kralin Feb 21 '18 at 17:01

0 Answers0