Size: 640
Comment:
|
← Revision 12 as of 2020-04-10 21:03:45 ⇥
Size: 4351
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
<<TableOfContents(3)>> |
|
Line 3: | Line 5: |
TODO: describe how to start the service on nkaba, for now, see: https://docs.google.com/document/d/1gy3z3UkyicYaF75ZXsxTEzS8c28hPTFa6dQU6Y0dj0o/edit# | See https://ad-wiki.informatik.uni-freiburg.de/research/StudentProjectsAndTheses#QLever_UI_.28Julian_B.2BAPw-rklin_und_Daniel_Kemen.29.2C_last_tested_on_17-01-2018 |
Line 5: | Line 7: |
= Broccoli-like features = | = Configuration = |
Line 7: | Line 9: |
We can mimick the relation suggestions using standard SPARQL features. Here is an example: | == Variant 1: suggestions of predicates with prefixes wdt: p: ps: pq: == For the field ''predicate name clause'' and ''alternative predicate name clause'' in the QLever UI backend configuration use the following, respectively: {{{ { { { ?qleverui_claim <http://wikiba.se/ontology#directClaim> ?qleverui_entity . ?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name } UNION { ?qleverui_claim <http://wikiba.se/ontology#claim> ?qleverui_entity . ?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name } } UNION { ?qleverui_claim <http://wikiba.se/ontology#statementProperty> ?qleverui_entity . ?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name } } UNION { ?qleverui_claim <http://wikiba.se/ontology#qualifier> ?qleverui_entity . ?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name } . }}} {{{ { { { ?qleverui_claim <http://wikiba.se/ontology#directClaim> ?qleverui_entity . ?qleverui_claim @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname } UNION { ?qleverui_claim <http://wikiba.se/ontology#claim> ?qleverui_entity . ?qleverui_claim @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname } } UNION { ?qleverui_claim <http://wikiba.se/ontology#statementProperty> ?qleverui_entity . ?qleverui_claim @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname } } UNION { ?qleverui_claim <http://wikiba.se/ontology#qualifier> ?qleverui_entity . ?qleverui_claim @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname } . }}} == Variant 2: suggestions of predicates with only prefix wdt: == For the field ''predicate name clause'' and ''alternative predicate name clause'' in the QLever UI backend configuration use the following, respectively: {{{ ?qleverui_claim <http://wikiba.se/ontology#directClaim> ?qleverui_entity . ?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name }}} {{{ ?qleverui_claim <http://wikiba.se/ontology#directClaim> ?qleverui_entity . ?qleverui_claim @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname }}} = Broccoli-style suggestions with SPARQL = We can mimick the suggestions using standard SPARQL features. Here are examples for each box (which can be tried via the [[http://metropolis.informatik.uni-freiburg.de:9000/sparql|Aqqu Virtuoso instance]]). == Instance suggestions == {{{ PREFIX fb: <http://rdf.freebase.com/ns/> SELECT ?person_name WHERE { ?person_id fb:people.person.profession ?profession_id . ?profession_id fb:type.object.name "Astronaut"@en . ?person_id fb:type.object.name ?person_name } GROUP BY ?person_id }}} With popularity scores (assuming an explicit predicate <popularity_score>): {{{ PREFIX fb: <http://rdf.freebase.com/ns/> SELECT DISTINCT ?person_name ?score WHERE { ?person_id fb:people.person.profession ?profession_id . ?profession_id fb:type.object.name "Astronaut"@en . ?person_id fb:type.object.name ?person_name . ?person_id <popularity_score> ?score } }}} == Class suggestions == They are redundant (fb:type.object.type + instance suggestions) == Relation suggestions == |
Line 20: | Line 97: |
Important note: for QLever, we will not be able to have queries with "?p ?o" in general. However, we could do something special for such queries (e.g. using a has-relations like Broccoli does) + we should use a syntax similar (or even identical) to that of SPARQL. == Word suggestions == There is (of course) nothing for word suggestions in SPARQL. But the QLever index can do just what the Broccoli index can do concerning word suggestions. One just needs to find a reasonable syntax to ask for it (and implement it). |
Contents
Install and run
Configuration
Variant 1: suggestions of predicates with prefixes wdt: p: ps: pq:
For the field predicate name clause and alternative predicate name clause in the QLever UI backend configuration use the following, respectively:
{ { { ?qleverui_claim <http://wikiba.se/ontology#directClaim> ?qleverui_entity . ?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name } UNION { ?qleverui_claim <http://wikiba.se/ontology#claim> ?qleverui_entity . ?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name } } UNION { ?qleverui_claim <http://wikiba.se/ontology#statementProperty> ?qleverui_entity . ?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name } } UNION { ?qleverui_claim <http://wikiba.se/ontology#qualifier> ?qleverui_entity . ?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name } .
{ { { ?qleverui_claim <http://wikiba.se/ontology#directClaim> ?qleverui_entity . ?qleverui_claim @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname } UNION { ?qleverui_claim <http://wikiba.se/ontology#claim> ?qleverui_entity . ?qleverui_claim @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname } } UNION { ?qleverui_claim <http://wikiba.se/ontology#statementProperty> ?qleverui_entity . ?qleverui_claim @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname } } UNION { ?qleverui_claim <http://wikiba.se/ontology#qualifier> ?qleverui_entity . ?qleverui_claim @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname } .
Variant 2: suggestions of predicates with only prefix wdt:
For the field predicate name clause and alternative predicate name clause in the QLever UI backend configuration use the following, respectively:
?qleverui_claim <http://wikiba.se/ontology#directClaim> ?qleverui_entity . ?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name
?qleverui_claim <http://wikiba.se/ontology#directClaim> ?qleverui_entity . ?qleverui_claim @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname
Broccoli-style suggestions with SPARQL
We can mimick the suggestions using standard SPARQL features. Here are examples for each box (which can be tried via the Aqqu Virtuoso instance).
Instance suggestions
PREFIX fb: <http://rdf.freebase.com/ns/> SELECT ?person_name WHERE { ?person_id fb:people.person.profession ?profession_id . ?profession_id fb:type.object.name "Astronaut"@en . ?person_id fb:type.object.name ?person_name } GROUP BY ?person_id
With popularity scores (assuming an explicit predicate <popularity_score>):
PREFIX fb: <http://rdf.freebase.com/ns/> SELECT DISTINCT ?person_name ?score WHERE { ?person_id fb:people.person.profession ?profession_id . ?profession_id fb:type.object.name "Astronaut"@en . ?person_id fb:type.object.name ?person_name . ?person_id <popularity_score> ?score }
Class suggestions
They are redundant (fb:type.object.type + instance suggestions)
Relation suggestions
PREFIX fb: <http://rdf.freebase.com/ns/> SELECT ?p COUNT(DISTINCT ?person_name) WHERE { ?person_id fb:people.person.profession ?profession_id . ?profession_id fb:type.object.name "Astronaut"@en . ?person_id fb:type.object.name ?person_name . ?person_id ?p ?o } GROUP BY ?p ORDER BY DESC(COUNT(DISTINCT ?person_name))
Important note: for QLever, we will not be able to have queries with "?p ?o" in general. However, we could do something special for such queries (e.g. using a has-relations like Broccoli does) + we should use a syntax similar (or even identical) to that of SPARQL.
Word suggestions
There is (of course) nothing for word suggestions in SPARQL. But the QLever index can do just what the Broccoli index can do concerning word suggestions. One just needs to find a reasonable syntax to ask for it (and implement it).