Help talk

Difference between revisions of "SPARQL"

Line 8: Line 8:
 
PREFIX prop: <https://lingualibre.org/prop/direct/>
 
PREFIX prop: <https://lingualibre.org/prop/direct/>
 
PREFIX statement: <https://lingualibre.org/entity/statement/>
 
PREFIX statement: <https://lingualibre.org/entity/statement/>
PREFIX wikibase: <http://wikiba.se/ontology#>       # in both sets
+
PREFIX wikibase: <http://wikiba.se/ontology#>   # in both sets
 
PREFIX llp: <https://lingualibre.org/prop/>
 
PREFIX llp: <https://lingualibre.org/prop/>
 
PREFIX llv: <https://lingualibre.org/prop/statement/>
 
PREFIX llv: <https://lingualibre.org/prop/statement/>
 
PREFIX llq: <https://lingualibre.org/prop/qualifier/>
 
PREFIX llq: <https://lingualibre.org/prop/qualifier/>
PREFIX wd: <http://www.wikidata.org/entity/>       # in both sets
+
PREFIX wd: <http://www.wikidata.org/entity/>   # in both sets
PREFIX wdt: <http://www.wikidata.org/prop/direct/>   # in both sets
+
PREFIX wdt: <http://www.wikidata.org/prop/direct/> # in both sets
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 19: Line 19:
 
According to [https://query.wikidata.org/# Wikidata Query Service] > Prefixes > Add standard prefixes, Wikidata's prefixes are :
 
According to [https://query.wikidata.org/# Wikidata Query Service] > Prefixes > Add standard prefixes, Wikidata's prefixes are :
 
<syntaxhighlight lang="sparql">
 
<syntaxhighlight lang="sparql">
PREFIX wd: <http://www.wikidata.org/entity/> # in both sets
+
PREFIX wd: <http://www.wikidata.org/entity/> # in both sets
PREFIX wdt: <http://www.wikidata.org/prop/direct/> # in both sets
+
PREFIX wdt: <http://www.wikidata.org/prop/direct/> # in both sets
PREFIX wikibase: <http://wikiba.se/ontology#> # in both sets
+
PREFIX wikibase: <http://wikiba.se/ontology#> # in both sets
 
PREFIX p: <http://www.wikidata.org/prop/>
 
PREFIX p: <http://www.wikidata.org/prop/>
 
PREFIX ps: <http://www.wikidata.org/prop/statement/>
 
PREFIX ps: <http://www.wikidata.org/prop/statement/>
Line 34: Line 34:
 
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
 
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
 
</syntaxhighlight>
 
</syntaxhighlight>
:[[User:Yug|Yug]] ([[User talk:Yug|talk]]) 20:51, 11 December 2021 (UTC)
+
:(Fully aligning Lili's prefix naming convention on wikidata system could also be beneficial. )
 +
: [[User:Yug|Yug]] ([[User talk:Yug|talk]]) 20:51, 11 December 2021 (UTC)
 +
 
 +
{| style="border:1px solid #CCC; padding: 10px;width:600px;margin:1em;"
 +
! URL || Wikidata || LinguaLibre || Alignment on URL/Wikidata
 +
|- style="border:1px solid #CCC; padding: 10px;margin:1em;"
 +
| /entity/ || entity: || wd: || ll:
 +
|-style="border:1px solid #CCC; padding: 10px;"
 +
| /entity/ || ll:  || wd: || ll:
 +
|-style="border:1px solid #CCC; padding: 10px;"
 +
| /prop/direct/ || wdt: || prop: || llt: 
 +
|-style="border:1px solid #CCC; padding: 10px;"
 +
| /entity/statement/ || — || statement: ||  ?:
 +
|-style="border:1px solid #CCC; padding: 10px;"
 +
| wikiba.se/ontology# || wikibase: || wikibase: || wikibase: (same)
 +
|-style="border:1px solid #CCC; padding: 10px;"
 +
| /prop/ || p: || llp:  || llp: (same)
 +
|-style="border:1px solid #CCC; padding: 10px;"
 +
| /prop/statement/ || ps: || llv:  || llps:
 +
|-style="border:1px solid #CCC; padding: 10px;"
 +
| /prop/qualifier/ || pq: || llq: || llpq:
 +
|}

Revision as of 21:23, 11 December 2021

Prefixes

LinguaLibre
For information, below are the prefixes currently defined in Blazegraph. (I just pushed it on Git repo "operations".) ~ Seb35 [^_^] 15:46, 29 July 2021 (UTC)

PREFIX entity: <https://lingualibre.org/entity/>
PREFIX ll: <https://lingualibre.org/entity/>
PREFIX prop: <https://lingualibre.org/prop/direct/>
PREFIX statement: <https://lingualibre.org/entity/statement/>
PREFIX wikibase: <http://wikiba.se/ontology#>    # in both sets
PREFIX llp: <https://lingualibre.org/prop/>
PREFIX llv: <https://lingualibre.org/prop/statement/>
PREFIX llq: <https://lingualibre.org/prop/qualifier/>
PREFIX wd: <http://www.wikidata.org/entity/>    # in both sets
PREFIX wdt: <http://www.wikidata.org/prop/direct/>  # in both sets

Wikidata (2021)
According to Wikidata Query Service > Prefixes > Add standard prefixes, Wikidata's prefixes are :

PREFIX wd: <http://www.wikidata.org/entity/> # in both sets
PREFIX wdt: <http://www.wikidata.org/prop/direct/> # in both sets
PREFIX wikibase: <http://wikiba.se/ontology#> # in both sets
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>

Picked just now. Yug (talk) 20:48, 11 December 2021 (UTC)

@Seb35 & VIGNERON I'm lightly surprised to not see xsd, which is used for integer and numeral values, in neither wikidata nor Lingualibre's lists of prefix. Any idea why ?
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
(Fully aligning Lili's prefix naming convention on wikidata system could also be beneficial. )
Yug (talk) 20:51, 11 December 2021 (UTC)
URL Wikidata LinguaLibre Alignment on URL/Wikidata
/entity/ entity: wd: ll:
/entity/ ll: wd: ll:
/prop/direct/ wdt: prop: llt:
/entity/statement/ statement: ?:
wikiba.se/ontology# wikibase: wikibase: wikibase: (same)
/prop/ p: llp: llp: (same)
/prop/statement/ ps: llv: llps:
/prop/qualifier/ pq: llq: llpq: