query-b92f32c55fb901c6bb84c0725f986318

rq turtle/ttl

Synia: lexeme

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX target: <http://www.wikidata.org/entity/L2310>

# Data for a specific lexeme
SELECT DISTINCT
  ?description
  (?valueLabel AS ?value_) ?value_Url
  ?source ?sourceUrl

  ?wikidata ?wikidataLabel ?wikidataUrl

  ?ordia ?ordiaLabel ?ordiaUrl

WHERE {
  {
    BIND(1 AS ?order)
    BIND("Lemma" AS ?description)
    target: wikibase:lemma ?value .
    BIND(?value AS ?valueLabel)

    BIND(target: AS ?wikidata)
    BIND(CONCAT(SUBSTR(STR(target:), 32), "&nbsp;↗") AS ?wikidataLabel)
    BIND(CONCAT("https://www.wikidata.org/wiki/Lexeme:", SUBSTR(STR(target:), 32)) AS ?wikidataUrl)

    BIND(target: AS ?ordia)
    BIND("Ordia&nbsp;↗" AS ?ordiaLabel)
    BIND(CONCAT("https://ordia.toolforge.org/", SUBSTR(STR(target:), 32)) AS ?ordiaUrl)

  }
  UNION 
  {
    BIND(2 AS ?order)
    BIND("Language" AS ?description)
    target: dct:language ?value .
    ?value rdfs:label ?valueLabel .
    FILTER (LANG(?valueLabel) = 'en')
    BIND(CONCAT("#language/", SUBSTR(STR(?value), 32))  AS ?value_Url)
  }
  UNION 
  {
    BIND(3 AS ?order)
    BIND("Lexical category" AS ?description)
    target: wikibase:lexicalCategory ?value .
    ?value rdfs:label ?valueLabel .
    FILTER (LANG(?valueLabel) = 'en')
    BIND(CONCAT("#lexicalcategory/", SUBSTR(STR(?value), 32))  AS ?value_Url)
  }
  UNION 
  {
    BIND(4 AS ?order)
    BIND("Instance of" AS ?description)
    target: p:P31 ?value_statement .
    ?value_statement ps:P31 ?value .
    ?value rdfs:label ?valueLabel .
    FILTER (LANG(?valueLabel) = 'en')
    BIND(CONCAT("#property/P31/value/", SUBSTR(STR(?value), 32))  AS ?value_Url)
    OPTIONAL {
      ?value_statement prov:wasDerivedFrom / pr:P248 ?source_ .
      ?source_ rdfs:label ?source .
      FILTER (LANG(?source) = 'en')
      BIND(CONCAT("#work/", SUBSTR(STR(?source_), 32))  AS ?sourceUrl)
    }
  }
  UNION 
  {
    BIND(6 AS ?order)
    BIND("Word stem" AS ?description)
    OPTIONAL {
      target: wdt:P5187 ?value .
    }
    BIND(?value AS ?valueLabel)
  }
  UNION 
  {
    BIND(10 AS ?order)
    BIND("Grammatical gender" AS ?description)
    target: wdt:P5185 ?value .
    ?value rdfs:label ?valueLabel .
    FILTER (LANG(?valueLabel) = 'en')
  }
  UNION 
  {
    BIND(11 AS ?order)
    BIND("Conjugation class" AS ?description)
    target: wdt:P5186 ?value .
    ?value rdfs:label ?valueLabel .
    FILTER (LANG(?valueLabel) = "en")
    BIND(CONCAT("#property/P5186/value/", SUBSTR(STR(?value), 32))  AS ?value_Url)

  }
  UNION 
  {
    BIND(12 AS ?order)
    BIND("Auxiliary verb" AS ?description)
    target: wdt:P5401 ?value .
    ?value wikibase:lemma ?valueLabel .
    # BIND(CONCAT("#property/P5401/value/", SUBSTR(STR(?value), 32))  AS ?value_Url)
    BIND(SUBSTR(STR(?value), 32) AS ?value_Url)
  }
  UNION 
  {
    # Characterized by
    BIND(13 AS ?order)
    BIND("Characterized by" AS ?description)
    wd:L2310 wdt:P1552 ?value .
    ?value rdfs:label ?valueLabel .
    FILTER (LANG(?valueLabel) = "en")
    BIND(CONCAT("#property/P1552/value/", SUBSTR(STR(?value), 32))  AS ?value_Url)
  }
  UNION 
  {
    # Derived from
    BIND(14 AS ?order)
    BIND("Derived from" AS ?description)
    OPTIONAL {
     target: wdt:P5191 ?value .
     ?value wikibase:lemma ?valueLabel .      
    }
    BIND(CONCAT("#lexeme/", SUBSTR(STR(?value), 32))  AS ?value_Url)
  }
  UNION 
  {
    # Homographs
    BIND(15 AS ?order)
    BIND("Homographs" AS ?description)
    target: wdt:P5402 ?value .
    ?value wikibase:lemma ?valueLabel .
    BIND(CONCAT("#lexeme/" ,SUBSTR(STR(?value), 32)) AS ?value_Url)
  }
  UNION 
  {
    BIND(18 AS ?order)
    BIND("Compound" AS ?description)
    target: wdt:P5238+ ?value .
    ?value wikibase:lemma ?valueLabel .
    BIND(CONCAT("#lexeme/", SUBSTR(STR(?value), 32))  AS ?value_Url)
  }
  UNION 
  {
    BIND(20 AS ?order)
    BIND("Described in" AS ?description)
    target: ontolex:lexicalForm? / p:P1343 ?value_statement .
    ?value_statement ps:P1343 ?value .
    ?value rdfs:label ?valueLabel .
    FILTER (LANG(?valueLabel) = 'en')
    BIND(CONCAT("#work/", SUBSTR(STR(?value), 32))  AS ?value_Url)
    OPTIONAL {
      ?value_statement prov:wasDerivedFrom / pr:P854 ?sourceUrl .
      BIND("↗" AS ?source)
    }
  }
  UNION 
  {
    BIND(30 AS ?order)
    BIND("First attested from" AS ?description)
    target: p:P6684 ?value_statement .
    ?value_statement ps:P6684 ?value .
    ?value rdfs:label ?valueLabel .
    FILTER (LANG(?valueLabel) = "en")
    BIND(CONCAT("#work/", SUBSTR(STR(?value), 32))  AS ?value_Url)
    OPTIONAL {
      ?value_statement prov:wasDerivedFrom / pr:P854 ?sourceUrl .
      OPTIONAL { ?value_statement pq:P577 ?date }
      BIND(COALESCE(
        CONCAT(STR(YEAR(?date)), "-", STR(MONTH(?date)), "-", STR(DAY(?date))),
        "↗") AS ?source)
    }
  }
  UNION 
  {
    BIND(31 AS ?order)
    BIND("Attested in" AS ?description)
    target: ontolex:lexicalForm? / p:P5323 ?value_statement .
    ?value_statement ps:P5323 ?value .
    ?value rdfs:label ?valueLabel .
    FILTER (LANG(?valueLabel) = "en")
    BIND(CONCAT("#lexemeattestor/", SUBSTR(STR(?value), 32))  AS ?value_Url)
    OPTIONAL {
      ?value_statement prov:wasDerivedFrom / pr:P854 ?sourceUrl .
      OPTIONAL { ?value_statement pq:P577 ?date }
      BIND(COALESCE(
      CONCAT(STR(YEAR(?date)), "-", STR(MONTH(?date)), "-", STR(DAY(?date)), "&nbsp;↗"),
        "↗") AS ?source)
    }
    OPTIONAL {
      ?value wdt:P577 ?date . 
      BIND(CONCAT(STR(YEAR(?date)), "-", STR(MONTH(?date)), "-", STR(DAY(?date))) AS ?source)
    }

  }
  UNION 
  {
    BIND(32 AS ?order)
    BIND("Usage example" AS ?description)
    target: p:P5831 ?value_statement .
    ?value_statement ps:P5831 ?value .
    BIND(CONCAT(?value, " ↗") AS ?valueLabel)
    BIND(CONCAT("https://ordia.toolforge.org/text-to-lexemes?text=", ENCODE_FOR_URI(?value), "&text-language=", LANG(?value)) AS ?value_Url)
    OPTIONAL {
      ?value_statement prov:wasDerivedFrom / pr:P248 ?source_ . 
      OPTIONAL {
        ?source_ rdfs:label ?title .
        FILTER (LANG(?title) = "en")     
      }
      BIND(COALESCE(?title, "Ref.") AS ?source)
      BIND(CONCAT("#reference/", SUBSTR(STR(?source_), 32)) AS ?sourceUrl)
    }   
  }
}
ORDER BY ?order

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v16("?date") v17("?description"):::projected v17("?order") v8("?ordia"):::projected v9("?ordiaLabel"):::projected v10("?ordiaUrl"):::projected v18("?source"):::projected v18("?sourceUrl"):::projected v14("?source_") v17("?title") v3("?value") v17("?valueLabel"):::projected v18("?value_") v17("?value_Url"):::projected v13("?value_statement") v5("?wikidata"):::projected v6("?wikidataLabel"):::projected v7("?wikidataUrl"):::projected a1((" ")) a2((" ")) a3((" ")) a4((" ")) a5((" ")) a6((" ")) a7((" ")) c1(["wd:L2310"]):::iri subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; subgraph union3[" Union "] subgraph union3l[" "] style union3l fill:#abf,stroke-dasharray: 3 3; subgraph union4[" Union "] subgraph union4l[" "] style union4l fill:#abf,stroke-dasharray: 3 3; subgraph union5[" Union "] subgraph union5l[" "] style union5l fill:#abf,stroke-dasharray: 3 3; subgraph union6[" Union "] subgraph union6l[" "] style union6l fill:#abf,stroke-dasharray: 3 3; subgraph union7[" Union "] subgraph union7l[" "] style union7l fill:#abf,stroke-dasharray: 3 3; subgraph union8[" Union "] subgraph union8l[" "] style union8l fill:#abf,stroke-dasharray: 3 3; subgraph union9[" Union "] subgraph union9l[" "] style union9l fill:#abf,stroke-dasharray: 3 3; subgraph union10[" Union "] subgraph union10l[" "] style union10l fill:#abf,stroke-dasharray: 3 3; subgraph union11[" Union "] subgraph union11l[" "] style union11l fill:#abf,stroke-dasharray: 3 3; subgraph union12[" Union "] subgraph union12l[" "] style union12l fill:#abf,stroke-dasharray: 3 3; subgraph union13[" Union "] subgraph union13l[" "] style union13l fill:#abf,stroke-dasharray: 3 3; subgraph union14[" Union "] subgraph union14l[" "] style union14l fill:#abf,stroke-dasharray: 3 3; bind0[/"'32^^xsd:integer'"/] bind0 --as--o v17 bind1[/"'Usage example'"/] bind1 --as--o v17 c1 --"p:P5831"--> v13 v13 --"p:statement/P5831"--> v3 bind2[/"concat(?value,' ↗')"/] v3 --o bind2 bind2 --as--o v17 bind3[/"concat('https://ordia.toolforge.org/text-to-lexemes?text=',encode-for-uri(?value),'&text-language=',?value)"/] v3 --o bind3 bind3 --as--o v17 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v13 -."prov:wasDerivedFrom".-> a7 a7 --"p:reference/P248"--> v14 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v14 -."rdfs:label".-> v17 end bind4[/"?title'Ref.'"/] v17 --o bind4 bind4 --as--o v18 bind5[/"concat('#reference/',substring(str(?source_),'32^^xsd:integer'))"/] v14 --o bind5 bind5 --as--o v18 end end subgraph union14r[" "] style union14r fill:#abf,stroke-dasharray: 3 3; f6[["?valueLabel = 'en'"]] f6 --> v17 bind7[/"'31^^xsd:integer'"/] bind7 --as--o v17 bind8[/"'Attested in'"/] bind8 --as--o v17 subgraph union15[" Union "] subgraph union15l[" "] style union15l fill:#abf,stroke-dasharray: 3 3; c1 --"ontolex:lexicalForm"--> a5 end subgraph union15r[" "] style union15r fill:#abf,stroke-dasharray: 3 3; end union15r <== or ==> union15l end a5 --"p:P5323"--> v13 v13 --"p:statement/P5323"--> v3 v3 --"rdfs:label"--> v17 bind9[/"concat('#lexemeattestor/',substring(str(?value),'32^^xsd:integer'))"/] v3 --o bind9 bind9 --as--o v17 subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v13 -."prov:wasDerivedFrom".-> a6 a6 --"p:reference/P854"--> v18 subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v13 -."p:qualifier/P577".-> v16 end bind10[/"concat(str(year-from-dateTime(?date)),'-',str(month-from-dateTime(?date)),'-',str(day-from-dateTime(?date)),'&nbsp;↗')'↗'"/] v16 --o bind10 bind10 --as--o v18 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:direct/P577".-> v16 bind11[/"concat(str(year-from-dateTime(?date)),'-',str(month-from-dateTime(?date)),'-',str(day-from-dateTime(?date)))"/] v16 --o bind11 bind11 --as--o v18 end end union14r <== or ==> union14l end end subgraph union13r[" "] style union13r fill:#abf,stroke-dasharray: 3 3; f12[["?valueLabel = 'en'"]] f12 --> v17 bind13[/"'30^^xsd:integer'"/] bind13 --as--o v17 bind14[/"'First attested from'"/] bind14 --as--o v17 c1 --"p:P6684"--> v13 v13 --"p:statement/P6684"--> v3 v3 --"rdfs:label"--> v17 bind15[/"concat('#work/',substring(str(?value),'32^^xsd:integer'))"/] v3 --o bind15 bind15 --as--o v17 subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v13 -."prov:wasDerivedFrom".-> a4 a4 --"p:reference/P854"--> v18 subgraph optional6["(optional)"] style optional6 fill:#bbf,stroke-dasharray: 5 5; v13 -."p:qualifier/P577".-> v16 end bind16[/"concat(str(year-from-dateTime(?date)),'-',str(month-from-dateTime(?date)),'-',str(day-from-dateTime(?date)))'↗'"/] v16 --o bind16 bind16 --as--o v18 end end union13r <== or ==> union13l end end subgraph union12r[" "] style union12r fill:#abf,stroke-dasharray: 3 3; f17[["?valueLabel = 'en'"]] f17 --> v17 bind18[/"'20^^xsd:integer'"/] bind18 --as--o v17 bind19[/"'Described in'"/] bind19 --as--o v17 subgraph union16[" Union "] subgraph union16l[" "] style union16l fill:#abf,stroke-dasharray: 3 3; c1 --"ontolex:lexicalForm"--> a2 end subgraph union16r[" "] style union16r fill:#abf,stroke-dasharray: 3 3; end union16r <== or ==> union16l end a2 --"p:P1343"--> v13 v13 --"p:statement/P1343"--> v3 v3 --"rdfs:label"--> v17 bind20[/"concat('#work/',substring(str(?value),'32^^xsd:integer'))"/] v3 --o bind20 bind20 --as--o v17 subgraph optional7["(optional)"] style optional7 fill:#bbf,stroke-dasharray: 5 5; v13 -."prov:wasDerivedFrom".-> a3 a3 --"p:reference/P854"--> v18 bind21[/"'↗'"/] bind21 --as--o v18 end end union12r <== or ==> union12l end end subgraph union11r[" "] style union11r fill:#abf,stroke-dasharray: 3 3; bind22[/"'18^^xsd:integer'"/] bind22 --as--o v17 bind23[/"'Compound'"/] bind23 --as--o v17 c1 --"p:direct/P5238"--> v3 v3 --"wikibase:lemma"--> v17 bind24[/"concat('#lexeme/',substring(str(?value),'32^^xsd:integer'))"/] v3 --o bind24 bind24 --as--o v17 end union11r <== or ==> union11l end end subgraph union10r[" "] style union10r fill:#abf,stroke-dasharray: 3 3; bind25[/"'15^^xsd:integer'"/] bind25 --as--o v17 bind26[/"'Homographs'"/] bind26 --as--o v17 c1 --"p:direct/P5402"--> v3 v3 --"wikibase:lemma"--> v17 bind27[/"concat('#lexeme/',substring(str(?value),'32^^xsd:integer'))"/] v3 --o bind27 bind27 --as--o v17 end union10r <== or ==> union10l end end subgraph union9r[" "] style union9r fill:#abf,stroke-dasharray: 3 3; bind28[/"'14^^xsd:integer'"/] bind28 --as--o v17 bind29[/"'Derived from'"/] bind29 --as--o v17 subgraph optional8["(optional)"] style optional8 fill:#bbf,stroke-dasharray: 5 5; c1 -."p:direct/P5191".-> v3 v3 --"wikibase:lemma"--> v17 end bind30[/"concat('#lexeme/',substring(str(?value),'32^^xsd:integer'))"/] v3 --o bind30 bind30 --as--o v17 end union9r <== or ==> union9l end end subgraph union8r[" "] style union8r fill:#abf,stroke-dasharray: 3 3; f31[["?valueLabel = 'en'"]] f31 --> v17 bind32[/"'13^^xsd:integer'"/] bind32 --as--o v17 bind33[/"'Characterized by'"/] bind33 --as--o v17 c1 --"p:direct/P1552"--> v3 v3 --"rdfs:label"--> v17 bind34[/"concat('#property/P1552/value/',substring(str(?value),'32^^xsd:integer'))"/] v3 --o bind34 bind34 --as--o v17 end union8r <== or ==> union8l end end subgraph union7r[" "] style union7r fill:#abf,stroke-dasharray: 3 3; bind35[/"'12^^xsd:integer'"/] bind35 --as--o v17 bind36[/"'Auxiliary verb'"/] bind36 --as--o v17 c1 --"p:direct/P5401"--> v3 v3 --"wikibase:lemma"--> v17 bind37[/"substring(str(?value),'32^^xsd:integer')"/] v3 --o bind37 bind37 --as--o v17 end union7r <== or ==> union7l end end subgraph union6r[" "] style union6r fill:#abf,stroke-dasharray: 3 3; f38[["?valueLabel = 'en'"]] f38 --> v17 bind39[/"'11^^xsd:integer'"/] bind39 --as--o v17 bind40[/"'Conjugation class'"/] bind40 --as--o v17 c1 --"p:direct/P5186"--> v3 v3 --"rdfs:label"--> v17 bind41[/"concat('#property/P5186/value/',substring(str(?value),'32^^xsd:integer'))"/] v3 --o bind41 bind41 --as--o v17 end union6r <== or ==> union6l end end subgraph union5r[" "] style union5r fill:#abf,stroke-dasharray: 3 3; f42[["?valueLabel = 'en'"]] f42 --> v17 bind43[/"'10^^xsd:integer'"/] bind43 --as--o v17 bind44[/"'Grammatical gender'"/] bind44 --as--o v17 c1 --"p:direct/P5185"--> v3 v3 --"rdfs:label"--> v17 end union5r <== or ==> union5l end end subgraph union4r[" "] style union4r fill:#abf,stroke-dasharray: 3 3; bind45[/"'6^^xsd:integer'"/] bind45 --as--o v17 bind46[/"'Word stem'"/] bind46 --as--o v17 subgraph optional9["(optional)"] style optional9 fill:#bbf,stroke-dasharray: 5 5; c1 -."p:direct/P5187".-> v3 end bind47[/"?value"/] v3 --o bind47 bind47 --as--o v17 end union4r <== or ==> union4l end end subgraph union3r[" "] style union3r fill:#abf,stroke-dasharray: 3 3; f48[["?valueLabel = 'en'"]] f48 --> v17 bind49[/"'4^^xsd:integer'"/] bind49 --as--o v17 bind50[/"'Instance of'"/] bind50 --as--o v17 c1 --"p:P31"--> v13 v13 --"p:statement/P31"--> v3 v3 --"rdfs:label"--> v17 bind51[/"concat('#property/P31/value/',substring(str(?value),'32^^xsd:integer'))"/] v3 --o bind51 bind51 --as--o v17 subgraph optional10["(optional)"] style optional10 fill:#bbf,stroke-dasharray: 5 5; v13 -."prov:wasDerivedFrom".-> a1 a1 --"p:reference/P248"--> v14 v14 --"rdfs:label"--> v18 bind52[/"concat('#work/',substring(str(?source_),'32^^xsd:integer'))"/] v14 --o bind52 bind52 --as--o v18 end end union3r <== or ==> union3l end end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; f53[["?valueLabel = 'en'"]] f53 --> v17 bind54[/"'3^^xsd:integer'"/] bind54 --as--o v17 bind55[/"'Lexical category'"/] bind55 --as--o v17 c1 --"wikibase:lexicalCategory"--> v3 v3 --"rdfs:label"--> v17 bind56[/"concat('#lexicalcategory/',substring(str(?value),'32^^xsd:integer'))"/] v3 --o bind56 bind56 --as--o v17 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; f57[["?valueLabel = 'en'"]] f57 --> v17 bind58[/"'2^^xsd:integer'"/] bind58 --as--o v17 bind59[/"'Language'"/] bind59 --as--o v17 c1 --"dct:language"--> v3 v3 --"rdfs:label"--> v17 bind60[/"concat('#language/',substring(str(?value),'32^^xsd:integer'))"/] v3 --o bind60 bind60 --as--o v17 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; bind61[/"'1^^xsd:integer'"/] bind61 --as--o v17 bind62[/"'Lemma'"/] bind62 --as--o v17 c1 --"wikibase:lemma"--> v3 bind63[/"?value"/] v3 --o bind63 bind63 --as--o v17 bind64[/"'wd:L2310'"/] bind64 --as--o v5 bind65[/"concat(substring(str('wd:L2310'),'32^^xsd:integer'),'&nbsp;↗')"/] bind65 --as--o v6 bind66[/"concat('https://www.wikidata.org/wiki/Lexeme:',substring(str('wd:L2310'),'32^^xsd:integer'))"/] bind66 --as--o v7 bind67[/"'wd:L2310'"/] bind67 --as--o v8 bind68[/"'Ordia&nbsp;↗'"/] bind68 --as--o v9 bind69[/"concat('https://ordia.toolforge.org/',substring(str('wd:L2310'),'32^^xsd:integer'))"/] bind69 --as--o v10 end union0r <== or ==> union0l end bind70[/"?valueLabel"/] v17 --o bind70 bind70 --as--o v18