0

I need to find the names of similar types from DBpedia so I'm trying to figure out a query which can return me the names of entities which have same subject type in its dct:subject (example I want to find similar types of white house so i want to write a query for same . I'm considering the dct:subject to find them ). If there is any other approach please mention it

Previously I tried it for rdf:type but the result are not so good and some time it shows time out

I have done my problem by the query mentioned below and now i want to consider dct:subject instead of rdf:type

select distinct  ?label ?resource count(distinct ?type) as ?score where {

values ?type { dbo:Thing dbo:Organization yago:WikicatIslam-relatedControversies yago:WikicatIslamistGroups yago:WikicatRussianFederalSecurityServiceDesignatedTerroristOrganizations yago:Abstraction100002137 yago:Act100030358 yago:Cabal108241798 yago:Group100031264 yago:Movement108464601 yago:PoliticalMovement108472335 
}

?resource rdfs:label ?label ;
foaf:name ?name ;
a ?type .
FILTER (lang(?label) = 'en').

}
ORDER BY DESC(?score)
UninformedUser
  • 8,397
  • 1
  • 14
  • 23
Anuj tyagi
  • 11
  • 3
  • And why aren't you using `dct:subject` property then with the corresponding DBpedia categories? – UninformedUser Jul 02 '19 at 06:36
  • dbpedia query engine generally shows timeout when i add more than 15 categories but i guess if i add subjects instead of rdf:type categories it shows more accurate results but my query shows error when i write dct:subject categories links (eg - http://dbpedia.org/resource/Category:Houses_completed_in_1800) – Anuj tyagi Jul 02 '19 at 06:42
  • it's the same query like last time, not sure why you open a second question. And I provided you a working query there. And I told you that your query is wrong, didn't I? You always get the number of types in your VALUES as score, don't you? – UninformedUser Jul 02 '19 at 06:46
  • Honestly, I asked you last time what the meaning of score is. You didn't answer - that's weird ... so, one last time, what is score. The number of different types an individual belongs to? – UninformedUser Jul 02 '19 at 06:48
  • And there is no class `dbo:Thing` ... and again, you're not using `foaf:name` in your query, so what's the purpose of `foaf:name ?name ;` ? – UninformedUser Jul 02 '19 at 06:49
  • the score is the number of categories that matched in that entity (ex - score is 10 so the 'xyz' name has 10 similar categories to white house ) in this query i am searching for all the rdf:types categories now i want to go for dct :subject categories and this doesn't work for them please provide me a solution for that if you have any query please ask me your time is highly appreciated – Anuj tyagi Jul 02 '19 at 07:47

0 Answers0