1,527
edits
(→SPARQL) |
(→Token) |
||
Line 17: | Line 17: | ||
#title: Galdetzen du tokenak non dauden wikisourcen, eta zer lema-formei lotuta dauden | #title: Galdetzen du tokenak non dauden wikisourcen, eta zer lema-formei lotuta dauden | ||
select ?token ?token_zbk ?token_forma ?mlv_lexema (iri(concat('http://www.wikidata.org/entity/',? | select ?token ?token_zbk ?token_forma ?mlv_lexema (iri(concat('http://www.wikidata.org/entity/',?sense_id)) as ?wikidata_sense) | ||
?wd_pos_label | |||
(iri(concat('https://eu.wikisource.org/wiki/',?wikisource)) as ?wikisource_paragraph) | (iri(concat('https://eu.wikisource.org/wiki/',?wikisource)) as ?wikisource_paragraph) | ||
?lemma ?sense ?forma (group_concat(?morph_label;SEPARATOR="-") as ?morph_labels) ?pos_label | ?lemma ?sense ?forma (group_concat(?morph_label;SEPARATOR="-") as ?morph_labels) ?pos_label | ||
(iri(concat('http://www.wikidata.org/entity/',?wd_erref)) as ?wd_ent_erref) | (iri(concat('http://www.wikidata.org/entity/',?wd_erref)) as ?wd_ent_erref) | ||
(concat(?wd_erref_label," (",?class_label,")") as ?wd_erref_info) | (concat(?wd_erref_label," (",?class_label,")") as ?wd_erref_info) | ||
where { | where { | ||
?token mdp:P5 mwb:Q15 ; | ?token mdp:P5 mwb:Q15 ; | ||
Line 30: | Line 31: | ||
optional { ?token mp:P7 ?lemmanode . ?lemmanode mps:P7 ?mlv_lexema. ?mlv_lexema wikibase:lemma ?lemma . | optional { ?token mp:P7 ?lemmanode . ?lemmanode mps:P7 ?mlv_lexema. ?mlv_lexema wikibase:lemma ?lemma . | ||
optional {?mlv_lexema mdp:P1 ?wd_qid .} | optional {?mlv_lexema mdp:P1 ?wd_qid .} | ||
optional {?lemmanode mpq:P155 ?sense_id. ?sense_id skos:definition ?sense .} | optional {?lemmanode mpq:P155 ?sense_id. ?sense_id skos:definition ?sense; mp:P1 [mpq:P153 ?wd_pos]. ?wd_pos rdfs:label ?wd_pos_label. filter(lang(?wd_pos_label) = "eu")} | ||
optional {?lemmanode mpq:P156 ?form_id. ?form_id ontolex:representation ?forma . | optional {?lemmanode mpq:P156 ?form_id. ?form_id ontolex:representation ?forma . | ||
optional {?form_id mdp:P172 ?morph. ?morph rdfs:label ?morph_label. filter(lang(?morph_label) = "eu")} | optional {?form_id mdp:P172 ?morph. ?morph rdfs:label ?morph_label. filter(lang(?morph_label) = "eu")} | ||
Line 41: | Line 42: | ||
select ?item ?wd_erref_label (sample(?class_l) as ?class_label) | select ?item ?wd_erref_label (sample(?class_l) as ?class_label) | ||
where {?item rdfs:label ?wd_erref_label. filter(lang(?wd_erref_label) = "eu") | where {?item rdfs:label ?wd_erref_label. filter(lang(?wd_erref_label) = "eu") | ||
?item wdt:P31/rdfs:label ?class_l. filter(lang(?class_l) = "eu")} | ?item wdt:P31/rdfs:label|wdt:P279/rdfs:label ?class_l. filter(lang(?class_l) = "eu")} | ||
group by ?item ?wd_erref_label ?class_label | group by ?item ?wd_erref_label ?class_label | ||
} | } | ||
} | } | ||
} group by ?token ?token_zbk ?token_forma ?mlv_lexema ? | } group by ?token ?token_zbk ?token_forma ?mlv_lexema ?sense_id ?wd_pos_label ?wikisource ?lemma ?sense ?forma ?morph_labels ?pos_label ?wd_erref ?wd_erref_label ?class_label | ||
order by xsd:integer(?token_zbk) | order by xsd:integer(?token_zbk) | ||
</sparql> | </sparql> |