Changeset 35917 for main


Ignore:
Timestamp:
2022-01-08T12:20:46+13:00 (2 years ago)
Author:
davidb
Message:

Added in new SPARQL query that demonstrates access the Essentia computed key estimates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/sparql.xsl

    r35190 r35917  
    254254
    255255
     256       
    256257        <div id="ssq-esc-entrants" style="display: none;">
    257258<!-- -->
     
    273274        </div>
    274275
     276        <div id="ssq-esc-entrants-with-key" style="display: none;">
     277<!-- -->
     278<xsl:text>
     279PREFIX gsdlextracted: &lt;http://greenstone.org/gsdlextracted#&gt;
     280PREFIX xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt;
     281PREFIX dc: &lt;http://purl.org/dc/elements/1.1/&gt;
     282PREFIX essentia: &lt;http://upf.edu/essentia#&gt;
     283
     284SELECT ?esc_entrant_uri ?country ?year ?musical_key ?scale ?strength_estimate WHERE {
     285  GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;  {
     286    ?esc_entrant_uri dc:Relation.isPartOf &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;.
     287
     288    ?esc_entrant_uri gsdlextracted:Year ?year.
     289    ?esc_entrant_uri gsdlextracted:Country ?country.
     290    ?esc_entrant_uri essentia:tonal_key_edma_key ?musical_key.
     291    ?esc_entrant_uri essentia:tonal_key_edma_scale ?scale.
     292    ?esc_entrant_uri essentia:tonal_key_edma_strength ?strength_estimate.
     293  }
     294}
     295ORDER BY ASC(?year) ?country
     296</xsl:text>
     297        </div>
     298       
    275299
    276300        <div id="ssq-jury-votes-totals-1975" style="display: none;">
     
    539563
    540564          <li>
     565        <b>Eurovision Song Contest (ESC) entrants with (estimated) musical key:</b><br/>
     566        <button type="button" class="load-ssq" id="load-ssq-esc-entrants-with-key" onclick="ssq_load('ssq-esc-entrants-with-key')">Load query above</button>
     567        <button type="button" class="exec-ssq" id="exec-ssq-esc-entrants-with-key" onclick="ssq_execute()">Get Results</button><br/>
     568       
     569        <p>
     570          Similar to the above query that list all the entrants (country and year) sorted by year, then by country, but also displays
     571          the estimated key signature of the song, which is pre-computed using the Essentia audio content analysis toolkit
     572          when the collection is built.
     573        </p>
     574          </li>
     575
     576                 
     577          <li>
    541578        <b>Voting Totals in 1975:</b><br/>
    542579        <button type="button" class="load-ssq" id="load-ssq-jury-votes-totals-1975" onclick="ssq_load('ssq-jury-votes-totals-1975')">Load query above</button>
     
    546583        totals of this Single voting format, and orders them by that score.</p>
    547584          </li>
     585
     586           
    548587         
    549588          <li>
Note: See TracChangeset for help on using the changeset viewer.