NeoVoc: Difference between revisions

From eneoli wikibase
 
(6 intermediate revisions by the same user not shown)
Line 52: Line 52:
   ?bib_item endp:P65 ?lexical_entry.
   ?bib_item endp:P65 ?lexical_entry.
} group by ?lexical_entry ?lang ?lemma order by desc(?in_how_many_articles)
} group by ?lexical_entry ?lang ?lemma order by desc(?in_how_many_articles)
</sparql>
=== All articles that contain terms denoting one concept ===
<sparql tryit="1">
#title: All articles that contain terms denoting one concept, here: "Q976" Neologism
PREFIX enwb: <https://eneoli.wikibase.cloud/entity/>
PREFIX endp: <https://eneoli.wikibase.cloud/prop/direct/>
select ?item ?itemLabel ?lang ?langLabel
     
where {
  ?item endp:P5 enwb:Q2; endp:P7 ?lang; endp:P65 [ontolex:sense [endp:P12 enwb:Q976]]. # change "Q976" for another concept
 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
</sparql>
</sparql>


Line 87: Line 102:
PREFIX enpq: <https://eneoli.wikibase.cloud/prop/qualifier/>
PREFIX enpq: <https://eneoli.wikibase.cloud/prop/qualifier/>


select ?language (count(?concept) as ?equivalents)  
select ?language (count(?equiv_st) as ?equivalents)  


where {
where {
Line 95: Line 110:
} group by ?language ?equivalents order by desc(?equivalents)
} group by ?language ?equivalents order by desc(?equivalents)
</sparql>
</sparql>
This query shows statistics by language considering only those equivalents that have no "warning", but do have a "validated by" qualifier. Those are the ones lexical entries are created for.
 
=== Validation statistics ===
This query lists how many multilingual equivalents have been validated by each validator.
<sparql tryit="1">
<sparql tryit="1">
#title:Number of equivalents present in NeoVoc concept entries (including unvalidated equivalents)
#title:Number of equivalents validated (equivalents with a "validated by" P64 qualifier pointing to an entity describing a person)
#defaultView:BarChart


PREFIX enwb: <https://eneoli.wikibase.cloud/entity/>
PREFIX enwb: <https://eneoli.wikibase.cloud/entity/>
Line 106: Line 122:
PREFIX enpq: <https://eneoli.wikibase.cloud/prop/qualifier/>
PREFIX enpq: <https://eneoli.wikibase.cloud/prop/qualifier/>


select ?language (count(?concept) as ?equivalents)  
select ?validator_entity ?validator (count(?equiv_st) as ?validated_equivalents)  


where {
where {
   ?concept endp:P5 enwb:Q12. # instances of "NeoVoc Concept"
   ?concept endp:P5 enwb:Q12. # instances of "NeoVoc Concept"
   ?concept enp:P57 ?equiv_st. ?equiv_st enps:P57 ?equiv; enpq:P64 ?validated. filter not exists{?equiv_st enpq:P58 ?warning.}
   ?concept enp:P57 ?equiv_st. ?equiv_st enps:P57 ?equiv.
  bind (lang(?equiv) as ?language)
  ?equiv_st enpq:P64 ?validator_entity.
} group by ?language ?equivalents order by desc(?equivalents)
  ?validator_entity rdfs:label ?validator. filter(lang(?validator)="en")
} group by ?validator_entity ?validator order by desc(?validated_equivalents)
</sparql>
</sparql>
 
This query lists which equivalents have been validated by each validator
=== Validation statistics ===
This query lists how many multilingual equivalents have been validated by each validator.
<sparql tryit="1">
<sparql tryit="1">
#title:Number of equivalents validated (equivalents with a "validated by" P64 qualifier pointing to an entity describing a person)
#title:Lists of equivalents with a "validated by" P64 qualifier pointing to an entity describing a person


PREFIX enwb: <https://eneoli.wikibase.cloud/entity/>
PREFIX enwb: <https://eneoli.wikibase.cloud/entity/>
Line 126: Line 141:
PREFIX enpq: <https://eneoli.wikibase.cloud/prop/qualifier/>
PREFIX enpq: <https://eneoli.wikibase.cloud/prop/qualifier/>


select ?validator_entity (sample(?validator) as ?validator_name) (count(?concept) as ?validated_equivalents)  
select ?validator_entity (sample(?validator) as ?validator_name) (group_concat(distinct concat('"',str(?equiv),'"@',lang(?equiv))) as ?validated_equivalents)  


where {
where {
Line 133: Line 148:
   ?equiv_st enpq:P64 ?validator_entity.
   ?equiv_st enpq:P64 ?validator_entity.
   ?validator_entity rdfs:label ?validator.  
   ?validator_entity rdfs:label ?validator.  
} group by ?validator_entity ?validator_name order by desc(?validated_equivalents)
 
} group by ?validator_entity ?validator_name ?validated_equivalents
</sparql>
</sparql>
This query lists which equivalents have been validated by each validator
== Checks for inconsistencies ==
=== Is there any mismatching equivalent-to-lexemesense link? ===
<sparql tryit="1">
<sparql tryit="1">
#title:Lists of equivalents with a "validated by" P64 qualifier pointing to an entity describing a person
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 enwb: <https://eneoli.wikibase.cloud/entity/>
PREFIX endp: <https://eneoli.wikibase.cloud/prop/direct/>
PREFIX endp: <https://eneoli.wikibase.cloud/prop/direct/>
Line 145: Line 186:
PREFIX enpq: <https://eneoli.wikibase.cloud/prop/qualifier/>
PREFIX enpq: <https://eneoli.wikibase.cloud/prop/qualifier/>


select ?validator_entity (sample(?validator) as ?validator_name) (group_concat(distinct concat('"',str(?equiv),'"@',lang(?equiv))) as ?validated_equivalents)
select ?lexeme ?lemma ?sense_id ?equiv


where {
where {
   ?concept endp:P5 enwb:Q12. # instances of "NeoVoc Concept"
   ?lexeme ontolex:sense ?sense; wikibase:lemma ?lemma.
   ?concept enp:P57 ?equiv_st. ?equiv_st enps:P57 ?equiv.  
  ?sense endp:P12 ?concept.
   ?equiv_st enpq:P64 ?validator_entity.
   ?concept enp:P57 ?equiv_st. ?equiv_st enps:P57 ?equiv.
  ?validator_entity rdfs:label ?validator.  
   filter(?lemma = ?equiv)
 
  bind(strafter(str(?sense),str(enwb:)) as ?sense_id)
} group by ?validator_entity ?validator_name ?validated_equivalents
  filter not exists {
    ?equiv_st enpq:P63 ?sense_id.
    }
}
</sparql>
</sparql>

Latest revision as of 16:16, 21 October 2024

NeoVoc, a multilingual vocabulary of Neology

SPARQL queries

All NeoVoc concept entries

#title: All NeoVoc concepts with labels in your browser's language (with English or French as fallback), and English and French descriptions.

PREFIX enwb: <https://eneoli.wikibase.cloud/entity/>
PREFIX endp: <https://eneoli.wikibase.cloud/prop/direct/>

select ?concept ?conceptLabel (iri(concat(str(wd:),?wd)) as ?wikidata) ?descript_en ?descript_fr
       
where { 
  ?concept endp:P5 enwb:Q12. # instances of "NeoVoc Concept"
  optional {?concept endp:P1 ?wd.}
  optional {?concept schema:description ?descript_en. filter(lang(?descript_en)="en")}
  optional {?concept schema:description ?descript_fr. filter(lang(?descript_fr)="fr")}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr". }
}

Try it!

All NeoVoc lexical entries

#title: All NeoVoc lexical entries with linked concept nodes

PREFIX enwb: <https://eneoli.wikibase.cloud/entity/>
PREFIX endp: <https://eneoli.wikibase.cloud/prop/direct/>

select ?lexical_entry (lang(?lemma) as ?lang) ?lemma ?sense ?concept ?conceptLabel (iri(concat(str(wd:),?wd)) as ?wikidata) ?descript_en ?descript_fr
       
where { 
  ?lexical_entry endp:P5 enwb:Q13; wikibase:lemma ?lemma; ontolex:sense ?sense.
  optional {?sense endp:P12 ?concept.
  optional {?concept endp:P1 ?wd.}
  optional {?concept schema:description ?descript_en. filter(lang(?descript_en)="en")}
  optional {?concept schema:description ?descript_fr. filter(lang(?descript_fr)="fr")}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr". }}
}

Try it!

NeoVoc lexical entries: occurrences in NeoCorpus articles

#title: NeoVoc lexical entry lemmata, and in how many articles they occur

PREFIX enwb: <https://eneoli.wikibase.cloud/entity/>
PREFIX endp: <https://eneoli.wikibase.cloud/prop/direct/>

select ?lexical_entry (lang(?lemma) as ?lang) ?lemma (count(?bib_item) as ?in_how_many_articles)
       
where { 
  ?lexical_entry endp:P5 enwb:Q13; wikibase:lemma ?lemma.
  ?bib_item endp:P65 ?lexical_entry.
} group by ?lexical_entry ?lang ?lemma order by desc(?in_how_many_articles)

Try it!

All articles that contain terms denoting one concept

#title: All articles that contain terms denoting one concept, here: "Q976" Neologism

PREFIX enwb: <https://eneoli.wikibase.cloud/entity/>
PREFIX endp: <https://eneoli.wikibase.cloud/prop/direct/>

select ?item ?itemLabel ?lang ?langLabel
       
where { 
  ?item endp:P5 enwb:Q2; endp:P7 ?lang; endp:P65 [ontolex:sense [endp:P12 enwb:Q976]]. # change "Q976" for another concept
  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Try it!


Coverage of NeoVoc concepts with multilingual equivalents

All existing equivalents

First, we define multilingual equivalents for the concepts; we do this in the concept entry. Lexical entries will be created after that. This query shows the progress in covering NeoVoc with multilingual equivalents.

#title:Number of equivalents present in NeoVoc concept entries (including unvalidated equivalents)
#defaultView:BarChart

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 ?language (count(?concept) as ?equivalents) 

where {
  ?concept endp:P5 enwb:Q12. # instances of "NeoVoc Concept"
  ?concept endp:P57 ?equiv.
  bind (lang(?equiv) as ?language)
} group by ?language ?equivalents order by desc(?equivalents)

Try it!

Validated equivalents

The following query shows the coverage of concept entries with equivalents in different languages, but counting only those that have been validated (i.e., where a "validated by" qualifier has been attached to the equivalent).

#title:Number of equivalents present in NeoVoc concept entries (validated equivalents only)
#defaultView:BarChart

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 ?language (count(?equiv_st) as ?equivalents) 

where {
  ?concept endp:P5 enwb:Q12. # instances of "NeoVoc Concept"
  ?concept enp:P57 ?equiv_st. ?equiv_st enps:P57 ?equiv. ?equiv_st enpq:P64 [rdfs:label ?validator]. filter(lang(?validator)="en")
  bind (lang(?equiv) as ?language)
} group by ?language ?equivalents order by desc(?equivalents)

Try it!


Validation statistics

This query lists how many multilingual equivalents have been validated by each validator.

#title:Number of equivalents validated (equivalents with a "validated by" P64 qualifier pointing to an entity describing a person)

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 ?validator_entity ?validator (count(?equiv_st) as ?validated_equivalents) 

where {
  ?concept endp:P5 enwb:Q12. # instances of "NeoVoc Concept"
  ?concept enp:P57 ?equiv_st. ?equiv_st enps:P57 ?equiv. 
  ?equiv_st enpq:P64 ?validator_entity.
  ?validator_entity rdfs:label ?validator. filter(lang(?validator)="en")
} group by ?validator_entity ?validator order by desc(?validated_equivalents)

Try it!

This query lists which equivalents have been validated by each validator

#title:Lists of equivalents with a "validated by" P64 qualifier pointing to an entity describing a person

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 ?validator_entity (sample(?validator) as ?validator_name) (group_concat(distinct concat('"',str(?equiv),'"@',lang(?equiv))) as ?validated_equivalents) 

where {
  ?concept endp:P5 enwb:Q12. # instances of "NeoVoc Concept"
  ?concept enp:P57 ?equiv_st. ?equiv_st enps:P57 ?equiv. 
  ?equiv_st enpq:P64 ?validator_entity.
  ?validator_entity rdfs:label ?validator. 
  
} group by ?validator_entity ?validator_name ?validated_equivalents

Try it!

Checks for inconsistencies

Is there any mismatching equivalent-to-lexemesense link?

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)

Try it!

Is there any linked lexeme sense not linked back from the equivalent?

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.
     }
}

Try it!