1,482
edits
Tag: Manual revert |
|||
Line 135: | Line 135: | ||
} group by ?validator_entity ?validator_name ?validated_equivalents | } group by ?validator_entity ?validator_name ?validated_equivalents | ||
</sparql> | |||
== Checks for inconsistencies == | |||
=== Is there any mismatching equivalent-to-lexemesense link? === | |||
<sparql tryit="1"> | |||
PREFIX enwb: <https://eneoli.wikibase.cloud/entity/> | |||
PREFIX endp: <https://eneoli.wikibase.cloud/prop/direct/> | |||
PREFIX enp: <https://eneoli.wikibase.cloud/prop/> | |||
PREFIX enps: <https://eneoli.wikibase.cloud/prop/statement/> | |||
PREFIX enpq: <https://eneoli.wikibase.cloud/prop/qualifier/> | |||
select ?concept ?equiv_st ?equiv_mylang ?descript_mylang (iri(concat(str(wd:),?wd)) as ?wikidata) ?from_sense ?from_lemma ?to_sense | |||
where { | |||
?concept endp:P5 enwb:Q12. # instances of "NeoVoc Concept" | |||
optional {?concept endp:P1 ?wd.} | |||
?concept enp:P57 ?equiv_st. ?equiv_st enps:P57 ?equiv_mylang. | |||
filter not exists {?equiv_st enpq:P58 ?warning.} # no warning | |||
?equiv_st enpq:P64 ?validator. # has been validated. | |||
?equiv_st enpq:P63 ?to_sense. # equivalent is linked to some sense. | |||
bind(iri(concat(str(enwb:),?to_sense)) as ?from_sense) | |||
?lexeme ontolex:sense ?from_sense; wikibase:lemma ?from_lemma. | |||
filter (?from_lemma != ?equiv_mylang) | |||
?from_sense endp:P12 ?concept. # from no lexeme sense of that language there is a link to this equivalent | |||
optional {} # is there a lexeme sense already linked from this concept (for the mylang language)? | |||
optional {?concept schema:description ?descript_mylang. filter(lang(?descript_mylang)=lang(?equiv_mylang))} | |||
} order by lcase(?equiv_mylang) | |||
</sparql> | |||
=== Is there any linked lexeme sense not linked back from the equivalent? === | |||
<sparql tryit="1"> | |||
PREFIX enwb: <https://eneoli.wikibase.cloud/entity/> | |||
PREFIX endp: <https://eneoli.wikibase.cloud/prop/direct/> | |||
PREFIX enp: <https://eneoli.wikibase.cloud/prop/> | |||
PREFIX enps: <https://eneoli.wikibase.cloud/prop/statement/> | |||
PREFIX enpq: <https://eneoli.wikibase.cloud/prop/qualifier/> | |||
select ?lexeme ?lemma ?sense_id ?equiv | |||
where { | |||
?lexeme ontolex:sense ?sense; wikibase:lemma ?lemma. | |||
?sense endp:P12 ?concept. | |||
?concept enp:P57 ?equiv_st. ?equiv_st enps:P57 ?equiv. | |||
filter(?lemma = ?equiv) | |||
bind(strafter(str(?sense),str(enwb:)) as ?sense_id) | |||
filter not exists { | |||
?equiv_st enpq:P63 ?sense_id. | |||
} | |||
} | |||
</sparql> | </sparql> |