fr en

SPARQL queries on PHB corpus

RC1: What are the name of available corpus ?

SELECT ?nom ?corpus WHERE {
  ?corpus a prov:Collection.
  ?corpus rdfs:label ?nom.
}

Execute this query

RC2: How many bulletins are in each corpus ?

SELECT (COUNT(?bsv) AS ?nb) ?nom ?corpus WHERE {
  ?corpus a prov:Collection.
  ?corpus rdfs:label ?nom.
  ?corpus prov:hadMember ?bsv.
} GROUP BY ?nom ?corpus

Execute this query

RC3: List the 100 first bulletins in the corpus test D2KAB ordering by publication date:

SELECT ?date ?bsv WHERE {
 <http://ontology.inrae.fr/bsv/resources/corpusTestD2KAB> prov:hadMember ?bsv .
 ?bsv dct:date ?date.
} ORDER BY ?date LIMIT 100

Execute this query

RC7: Which area (french administrative region) published the most, in the D2KAB test corpus ?

Compute the number of bulletins per area and then order the area.

SELECT ?nom (COUNT(?bsv) AS ?nb) WHERE {
 <http://ontology.inrae.fr/bsv/resources/corpusTestD2KAB> prov:hadMember ?bsv.
 ?bsv a d2kab:Bulletin.
 ?bsv dct:spatial ?loc.
SERVICE <http://ontology.inrae.fr/wd/sparql> {
  ?loc schema:name ?nom
  FILTER (LANG(?nom) = "fr")
}} GROUP BY ?nom ORDER BY DESC(?nb)

Execute this query

RC8: Which document formats are available for each bulletin, in the D2KAB test corpus ?

SELECT DISTINCT ?bsv ?format WHERE {
 <http://ontology.inrae.fr/bsv/resources/corpusTestD2KAB> prov:hadMember ?bsv .
 ?bsv a d2kab:Bulletin .
 ?bsv dul:isRealizedBy ?realization .
 ?realization dce:format ?format .
} ORDER BY ?bsv

Execute this query

RC14: Which html file is the conversion of the pdf file related to the document D ?

The document D is any bulletin of your choice taken from the D2KAB test corpus

SELECT ?bsv ?html ?pdf WHERE {
 BIND (D AS ?bsv)
 ?bsv a d2kab:Bulletin.
 ?bsv dul:isRealizedBy ?doc.
 ?doc a prov:Entity.
 ?doc dce:format "text/html".
 ?doc schema:url ?html.
 ?doc prov:wasDerivedFrom ?doc_pdf.
 ?doc_pdf a prov:Entity.
 ?doc_pdf dce:format "application/pdf".
 ?doc_pdf schema:url ?pdf.
}

Execute this query

RC18: How many annotations related to FCU thesaurus are generated for the document D ?

The document D is any bulletin of your choice taken from the D2KAB test corpus

SELECT COUNT(?annot) WHERE {
  BIND (D AS ?bsv)
  ?bsv a d2kab:Bulletin.
  ?bsv dul:isRealizedBy ?html.
  ?html a prov:Entity.
  ?html dce:format "text/html".
  ?target a oa:ResourceSelection.
  ?target oa:hasSource ?html.
  ?target oa:hasSelector ?sel.
  ?annot a oa:Annotation.
  ?annot oa:hasTarget ?target.
  ?annot oa:hasBody ?k.
  SERVICE <http://ontology.inrae.fr/frenchcropusage/sparql> {
   ?k a skos:Concept.
  }
}

Execute this query

RC19: How many annotations of fcu:Vignes concept are generated for the document D ?

The document D is any grapevine bulletin of your choice taken from the D2KAB test corpus

SELECT ?bsv COUNT(?annot) WHERE {
  BIND (D AS ?bsv)
  ?bsv a d2kab:Bulletin.
  ?bsv dul:isRealizedBy ?html.
  ?html a prov:Entity.
  ?html dce:format "text/html".
  ?target a oa:ResourceSelection.
  ?target oa:hasSource ?html.
  ?target oa:hasSelector ?sel.
  ?annot a oa:Annotation.
  ?annot oa:hasTarget ?target.
  ?annot oa:hasBody fcu:Vignes.
} GROUP BY ?bsv

Execute this query

RC20: How many bulletins from D2KAB test corpus are annotated with the fcu:Vignes concept ?

SELECT (COUNT(DISTINCT ?bsv) AS ?nb) WHERE {
  <http://ontology.inrae.fr/bsv/resources/corpusTestD2KAB> prov:hadMember ?bsv.
  ?bsv dul:isRealizedBy ?html.
  ?html a schema:DigitalDocument.
  ?html dce:format "text/html".
  ?aa a d2kab:AutomaticAnnotation.
  ?aa oa:hasBody fcu:Vignes.
  ?aa oa:hasTarget ?target.
  ?target a oa:ResourceSelection.
  ?target oa:hasSource ?html.
}

Execute this query

Weather data

CASO

BSV

ppdo

AgronomicTaxon

AgroTechnoPôle

GIEEA

edit SideBar

Blix theme adapted by David Gilbert, powered by PmWiki