view echonest/index.html @ 19:1e79ce3ff5f5 tip

Simplify and cut some non-working resource paths
author Chris Cannam
date Wed, 08 Nov 2017 15:27:23 +0000
parents 1e44d666ced1
children
line wrap: on
line source
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title>DBTune - Echonest Analyze XML to Music Ontology RDF</title>

<style type="text/css" media="all">
        @import url(style.css);
</style>

</head>

<body>


<a href="http://dbtune.org/"><h1 style="font-size: 250%;">DBTune.org</h1></a>

<br/>

<div id="tagline">Echonest Analyze XML to Music Ontology RDF</div>


<p>
A simple XSL for transforming the results of the <a href="http://the.echonest.com/analyze.html">Echonest Analyze API</a> to <a href="http://musicontology.com/">Music Ontology</a> RDF. 
</p>

<p>
Original file: <a href="http://dbtune.org/echonest/analyze-example.xml">analyze-example.xml</a><br/>
Transform: <a href="http://dbtune.org/echonest/echonest.xsl">echonest.xsl</a><br/>
Results: <a href="http://dbtune.org/echonest/analyze-example.rdf">analyze-example.rdf</a><br/>
</p>

<p>
<form method="get" action="http://www.w3.org/2005/08/online_xslt/xslt">
<label>URI of XSL resource <input type="text" size="50" name="xslfile" value="http://dbtune.org/echonest/echonest.xsl"/></label>
<br/>
<label>URI of Echonest Analyze XML resource <input type="text" size="50" name="xmlfile" value="http://dbtune.org/echonest/analyze-example.xml"/></label><br/>
<input type="submit" value="Transform!" name="transform">
</form>
</p>

<p>
The resulting RDF can be queried using <a href="http://www.w3.org/TR/rdf-sparql-query/">SPARQL</a>.
For example, the <a href="http://dbtune.org/echonest/structure.rq">following query</a> 
selects starts and durations for extracted structural segments (eg. chorus, verse, etc.).
<pre>
PREFIX af: &lt;http://purl.org/ontology/af/&gt;
PREFIX event: &lt;http://purl.org/NET/c4dm/event.owl#&gt;
PREFIX tl: &lt;http://purl.org/NET/c4dm/timeline.owl#&gt;

SELECT ?start ?duration
FROM &lt;http://dbtune.org/echonest/analyze-example.rdf&gt;
WHERE
{
?e      a af:StructuralSegment;
        event:time ?time.
?time   tl:start ?start;
        tl:duration ?duration.
}
</pre>
I tested this query with <a href="http://librdf.org/rasqal/roqet.html">Roqet</a> and <a href="http://jena.sourceforge.net">ARQ</a>.
</p>

<p>
The outputted RDF is designed using the <a href="http://musicontology.com/">
Music Ontology</a>, the <a href="http://purl.org/ontology/af/">Audio Features ontology</a> and
a small <a href="http://purl.org/ontology/echonest/">Echonest ontology</a> extending the latter.
</p>

<p>
RDF could be automatically extracted from the Echonest Analyze results through <a href="http://www.w3.org/TR/grddl/">GRDDL</a>,
by adding the following:
<pre>
&lt;Analysis 	xmlns:grddl="http://www.w3.org/2003/g/data-view#" 
		grddl:transformation="http://dbtune.org/echonest/echonest.xsl"&gt;
...
&lt;/Analysis&gt;
</pre>
</p>

<p>
Author: <a href="http://moustaki.org/">Yves Raimond</a>
</p>

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3327144-3");
pageTracker._initData();
pageTracker._trackPageview();
</script>


</body>

</html>