Is it possible to make a query to extract all the attributes from all the smartphones present in DBPedia?
Asked
Active
Viewed 148 times
1 Answers
1
It depends what exactly you need. You basically need to take "all x
with type smartphone" and then you need to get everything about that x
.
select distinct * where {
?phone dbpedia-owl:type|dbpprop:type dbpedia:Smartphone.
?phone ?x ?y
}
For example, for getting the CPU, you can write:
select distinct * where {
?phone dbpedia-owl:type|dbpprop:type dbpedia:Smartphone.
?phone dbpprop:cpu ?cpu.
}
Because if you look at Iphone 5, you will see that there is a CPU property defined. However, for brands it becomes more difficult. Some of the phone have developer
defined (look at Iphone 3G), but other such as iPhone 5 has brand, or some have manufacturer
, and some might have none. So basically you need to decide which one is it that you are looking for:
select distinct * where {
?phone dbpedia-owl:type|dbpprop:type dbpedia:Smartphone.
?phone dbpprop:cpu ?cpu.
optional { ?phone dbpprop:manufacturer ?developer. }
}

Artemis
- 3,271
- 2
- 20
- 33
-
Thanks for the answer :)... I need to retrive all the smartphone pages (like this http://en.wikipedia.org/wiki/IPhone_6) stored on DBPedia... and extract only some attributes like CPU and Brand Name... could you help me? – Usi Usi Apr 18 '15 at 13:09