Mercurial > hg > audio-features-catalogue
changeset 15:53069717108c
fuxi base literal update
author | nothing@tehis.net |
---|---|
date | Sun, 14 Apr 2013 17:54:23 +0100 |
parents | c68793c3213a |
children | 9bd7159cb9cc |
files | fca/fcaDotGen.py fuxi/af-base-facts.n3 fuxi/af-base-literal-facts.n3 fuxi/af-base-literal-rules.n3 fuxi/af-base-ontology.n3 fuxi/af-base-ontology.rdf fuxi/af-base-properties.n3 fuxi/af-base-properties.rdf fuxi/af-base-rules.n3 fuxi/af-ontology.n3 fuxi/af-ontology.rdf fuxi/convertImplicationstoN3.py pdfextract/filters.txt rdfpy/writeBaseOnto.py rdfpy/writeMIRToolboxOnto.py rdfpy/writeMarsyasOnto.py |
diffstat | 16 files changed, 1300 insertions(+), 183 deletions(-) [+] |
line wrap: on
line diff
--- a/fca/fcaDotGen.py Thu Apr 04 16:25:39 2013 +0100 +++ b/fca/fcaDotGen.py Sun Apr 14 17:54:23 2013 +0100 @@ -36,6 +36,19 @@ return features.sort() +def getOnlyBaseFeatures(): + features = [] + cns = URIRef(u'http://sovarr.c4dm.eecs.qmul.ac.uk/features/computedIn') + dns = URIRef(u'http://sovarr.c4dm.eecs.qmul.ac.uk/features/domain') + for su in graph.subjects(RDF.type, OWL.Class): + compcount = sum(1 for _ in graph.objects(su,cns)) + domcount = sum(1 for _ in graph.objects(su,dns)) + if compcount > 0 and domcount > 0: + features.append(su.split('/')[-1]) + + return features.sort() + + def getTools(): return graph.query( """SELECT DISTINCT ?tool @@ -102,7 +115,7 @@ matrix = [] #cat = ["domain", "level", "temporalscale", "dimensions", "output", "tag"] - cat = ["output", "domain", "level", "temporalscale", "dimensionality", "model"] + cat = ["domain", "level", "temporalscale", "dimensionality", "model", "complexity"] catdict = {} for nm in cat: @@ -113,11 +126,15 @@ local = value features = [] - ns = URIRef(u'http://sovarr.c4dm.eecs.qmul.ac.uk/features/computedIn') + cns = URIRef(u'http://sovarr.c4dm.eecs.qmul.ac.uk/features/computedIn') + dns = URIRef(u'http://sovarr.c4dm.eecs.qmul.ac.uk/features/temporalscale') for su in graph.subjects(RDF.type, OWL.Class): - count = sum(1 for _ in graph.objects(su,ns)) - if count > 1: + compcount = sum(1 for _ in graph.objects(su,cns)) + domcount = sum(1 for _ in graph.objects(su,dns)) + if compcount > 0 and domcount > 0 and su.find('MPEG7') == -1: features.append(su.split('/')[-1]) + + #features = features.sort() for it in features: rows.append(it)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fuxi/af-base-facts.n3 Sun Apr 14 17:54:23 2013 +0100 @@ -0,0 +1,123 @@ +@prefix af: <http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#> . + +af:BeatHistogram a af:AudioFeature ; + af:complexity af:MediumComplexity ; + af:dimensionality af:MultidimensionalDimensionality ; + af:domain af:ModulationFrequencyDomain ; + af:level af:PerceptualLevel ; + af:temporalscale af:InterframeTemporalscale . + +af:BeatSpectrum a af:AudioFeature ; + af:complexity af:HighComplexity ; + af:dimensionality af:MultidimensionalDimensionality ; + af:domain af:ModulationFrequencyDomain ; + af:level af:PerceptualLevel ; + af:temporalscale af:InterframeTemporalscale . + +af:Chromagram a af:AudioFeature ; + af:complexity af:MediumComplexity ; + af:dimensionality af:MultidimensionalDimensionality ; + af:domain af:FrequencyDomain ; + af:level af:PerceptualLevel ; + af:temporalscale af:IntraframeTemporalscale . + +af:Inharmonicity a af:AudioFeature ; + af:complexity af:MediumComplexity ; + af:dimensionality af:OnedimensionalDimensionality ; + af:domain af:FrequencyDomain ; + af:level af:PerceptualLevel ; + af:temporalscale af:IntraframeTemporalscale . + +af:LineSpectralFrequencies a af:AudioFeature ; + af:complexity af:MediumComplexity ; + af:dimensionality af:MultidimensionalDimensionality ; + af:domain af:FrequencyDomain ; + af:level af:PhysicalLevel ; + af:temporalscale af:IntraframeTemporalscale . + +af:LinearPredictionCepstralCoefficients a af:AudioFeature ; + af:complexity af:MediumComplexity ; + af:dimensionality af:MultidimensionalDimensionality ; + af:domain af:CepstralDomain ; + af:level af:PhysicalLevel ; + af:temporalscale af:IntraframeTemporalscale . + +af:LinearPredictiveCoding a af:AudioFeature ; + af:complexity af:LowComplexity ; + af:dimensionality af:MultidimensionalDimensionality ; + af:domain af:FrequencyDomain ; + af:level af:PhysicalLevel ; + af:temporalscale af:IntraframeTemporalscale . + +af:MelscaleFrequencyCepstralCoefficients a af:AudioFeature ; + af:complexity af:HighComplexity ; + af:dimensionality af:MultidimensionalDimensionality ; + af:domain af:CepstralDomain ; + af:level af:PhysicalLevel ; + af:model af:PsychoacousticModel ; + af:temporalscale af:IntraframeTemporalscale . + +af:Pitch a af:AudioFeature ; + af:complexity af:LowComplexity ; + af:dimensionality af:OnedimensionalDimensionality ; + af:domain af:FrequencyDomain ; + af:level af:PerceptualLevel ; + af:temporalscale af:IntraframeTemporalscale . + +af:Sharpness a af:AudioFeature ; + af:complexity af:MediumComplexity ; + af:dimensionality af:OnedimensionalDimensionality ; + af:domain af:FrequencyDomain ; + af:level af:PerceptualLevel ; + af:model af:PsychoacousticModel ; + af:temporalscale af:IntraframeTemporalscale . + +af:SpectralCentroid a af:AudioFeature ; + af:complexity af:LowComplexity ; + af:dimensionality af:OnedimensionalDimensionality ; + af:domain af:FrequencyDomain ; + af:level af:PerceptualLevel ; + af:temporalscale af:IntraframeTemporalscale . + +af:SpectralCrest a af:AudioFeature ; + af:complexity af:LowComplexity ; + af:dimensionality af:MultidimensionalDimensionality ; + af:domain af:FrequencyDomain ; + af:level af:PerceptualLevel ; + af:temporalscale af:IntraframeTemporalscale . + +af:SpectralFlatness a af:AudioFeature ; + af:complexity af:MediumComplexity ; + af:dimensionality af:MultidimensionalDimensionality ; + af:domain af:FrequencyDomain ; + af:level af:PerceptualLevel ; + af:temporalscale af:IntraframeTemporalscale . + +af:SpectralFlux a af:AudioFeature ; + af:complexity af:LowComplexity ; + af:dimensionality af:OnedimensionalDimensionality ; + af:domain af:FrequencyDomain ; + af:level af:PhysicalLevel ; + af:temporalscale af:IntraframeTemporalscale . + +af:SpectralRolloff a af:AudioFeature ; + af:complexity af:LowComplexity ; + af:dimensionality af:OnedimensionalDimensionality ; + af:domain af:FrequencyDomain ; + af:level af:PerceptualLevel ; + af:temporalscale af:IntraframeTemporalscale . + +af:SpectralSlope a af:AudioFeature ; + af:complexity af:LowComplexity ; + af:dimensionality af:MultidimensionalDimensionality ; + af:domain af:FrequencyDomain ; + af:level af:PhysicalLevel ; + af:temporalscale af:IntraframeTemporalscale . + +af:ZeroCrossingRate a af:AudioFeature ; + af:complexity af:LowComplexity ; + af:dimensionality af:OnedimensionalDimensionality ; + af:domain af:TemporalDomain ; + af:level af:PhysicalLevel ; + af:temporalscale af:IntraframeTemporalscale . +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fuxi/af-base-literal-facts.n3 Sun Apr 14 17:54:23 2013 +0100 @@ -0,0 +1,130 @@ +@prefix af: <http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#> . + +af:BeatHistogram a af:AudioFeature ; + af:complexity "medium" ; + af:dimensionality "multi-dimensional" ; + af:domain "modulation frequency" ; + af:level "perceptual" ; + af:temporalscale "interframe" . + +af:BeatSpectrum a af:AudioFeature ; + af:complexity "high" ; + af:dimensionality "multi-dimensional" ; + af:domain "modulation frequency" ; + af:level "perceptual" ; + af:temporalscale "interframe" . + +af:Chromagram a af:AudioFeature ; + af:complexity "medium" ; + af:dimensionality "multi-dimensional" ; + af:domain "frequency" ; + af:level "perceptual" ; + af:temporalscale "intraframe" . + +af:Inharmonicity a af:AudioFeature ; + af:complexity "medium" ; + af:dimensionality "one-dimensional" ; + af:domain "frequency" ; + af:level "perceptual" ; + af:temporalscale "intraframe" . + +af:LineSpectralFrequencies a af:AudioFeature ; + af:complexity "medium" ; + af:dimensionality "multi-dimensional" ; + af:domain "frequency" ; + af:level "physical" ; + af:temporalscale "intraframe" . + +af:LinearPredictionCepstralCoefficients a af:AudioFeature ; + af:complexity "medium" ; + af:dimensionality "multi-dimensional" ; + af:domain "cepstral", + "time" ; + af:level "physical" ; + af:temporalscale "intraframe" . + +af:LinearPredictiveCoding a af:AudioFeature ; + af:complexity "low" ; + af:dimensionality "multi-dimensional" ; + af:domain "frequency" ; + af:level "physical" ; + af:temporalscale "intraframe" . + +af:MelscaleFrequencyCepstralCoefficients a af:AudioFeature ; + af:complexity "high" ; + af:dimensionality "multi-dimensional" ; + af:domain "cepstral", + "frequency", + "time" ; + af:level "physical" ; + af:model "psychoacoustic" ; + af:temporalscale "intraframe" . + +af:Pitch a af:AudioFeature ; + af:complexity "low" ; + af:dimensionality "one-dimensional" ; + af:domain "frequency" ; + af:level "perceptual" ; + af:temporalscale "intraframe" . + +af:Sharpness a af:AudioFeature ; + af:complexity "medium" ; + af:dimensionality "one-dimensional" ; + af:domain "frequency" ; + af:level "perceptual" ; + af:model "psychoacoustic" ; + af:temporalscale "intraframe" . + +af:SpectralCentroid a af:AudioFeature ; + af:complexity "low" ; + af:dimensionality "one-dimensional" ; + af:domain "frequency", + "time" ; + af:level "perceptual" ; + af:temporalscale "intraframe" . + +af:SpectralCrest a af:AudioFeature ; + af:complexity "low" ; + af:dimensionality "multi-dimensional" ; + af:domain "frequency" ; + af:level "perceptual" ; + af:temporalscale "intraframe" . + +af:SpectralFlatness a af:AudioFeature ; + af:complexity "medium" ; + af:dimensionality "multi-dimensional" ; + af:domain "frequency", + "time" ; + af:level "perceptual" ; + af:temporalscale "intraframe" . + +af:SpectralFlux a af:AudioFeature ; + af:complexity "low" ; + af:dimensionality "one-dimensional" ; + af:domain "frequency" ; + af:level "physical" ; + af:temporalscale "intraframe" . + +af:SpectralRolloff a af:AudioFeature ; + af:complexity "low" ; + af:dimensionality "one-dimensional" ; + af:domain "frequency", + "time" ; + af:level "perceptual" ; + af:temporalscale "intraframe" . + +af:SpectralSlope a af:AudioFeature ; + af:complexity "low" ; + af:dimensionality "multi-dimensional" ; + af:domain "frequency" ; + af:level "physical" ; + af:temporalscale "intraframe" . + +af:ZeroCrossingRate a af:AudioFeature ; + af:complexity "low" ; + af:dimensionality "one-dimensional" ; + af:domain "temporal", + "time" ; + af:level "physical" ; + af:temporalscale "intraframe" . +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fuxi/af-base-literal-rules.n3 Sun Apr 14 17:54:23 2013 +0100 @@ -0,0 +1,36 @@ +@prefix af: <http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . + +{ ?x01 a af:AudioFeature . ?x01 af:domain "frequency" } => { ?x01 af:temporalscale "intraframe" } . +{ ?x02 a af:AudioFeature . ?x02 af:complexity "high" } => { ?x02 af:dimensionality "multi dimensional" } . +{ ?x03 a af:AudioFeature . ?x03 af:temporalscale "interframe" } => { ?x03 af:domain "modulation frequency" . ?x03 af:dimensionality "multi dimensional" . ?x03 af:level "perceptual" } . +{ ?x04 a af:AudioFeature . ?x04 af:complexity "low" } => { ?x04 af:temporalscale "intraframe" } . +{ ?x05 a af:AudioFeature . ?x05 af:domain "modulation frequency" } => { ?x05 af:temporalscale "interframe" . ?x05 af:dimensionality "multi dimensional" . ?x05 af:level "perceptual" } . +{ ?x06 a af:AudioFeature . ?x06 af:temporalscale "intraframe" . ?x06 af:complexity "low" . ?x06 af:dimensionality "multi dimensional" } => { ?x06 af:domain "frequency" } . +{ ?x07 a af:AudioFeature . ?x07 af:dimensionality "one dimensional" } => { ?x07 af:temporalscale "intraframe" } . +{ ?x08 a af:AudioFeature . ?x08 af:temporalscale "intraframe" . ?x08 af:complexity "medium" . ?x08 af:dimensionality "one dimensional" } => { ?x08 af:domain "frequency" . ?x08 af:level "perceptual" } . +{ ?x09 a af:AudioFeature . ?x09 af:temporalscale "intraframe" . ?x09 af:level "perceptual" } => { ?x09 af:domain "frequency" } . +{ ?x10 a af:AudioFeature . ?x10 af:complexity "high" . ?x10 af:dimensionality "multi dimensional" . ?x10 af:level "perceptual" } => { ?x10 af:temporalscale "interframe" . ?x10 af:domain "modulation frequency" } . +{ ?x11 a af:AudioFeature . ?x11 af:level "physical" } => { ?x11 af:temporalscale "intraframe" } . +{ ?x12 a af:AudioFeature . ?x12 af:temporalscale "intraframe" . ?x12 af:complexity "medium" . ?x12 af:level "physical" } => { ?x12 af:dimensionality "multi dimensional" } . +{ ?x13 a af:AudioFeature . ?x13 af:temporalscale "intraframe" . ?x13 af:dimensionality "one dimensional" . ?x13 af:level "physical" } => { ?x13 af:complexity "low" } . +{ ?x14 a af:AudioFeature . ?x14 af:model "psychoacoustic" } => { ?x14 af:domain "frequency" . ?x14 af:temporalscale "intraframe" } . +{ ?x15 a af:AudioFeature . ?x15 af:domain "frequency" . ?x15 af:temporalscale "intraframe" . ?x15 af:complexity "medium" . ?x15 af:model "psychoacoustic" } => { ?x15 af:dimensionality "one dimensional" . ?x15 af:level "perceptual" } . +{ ?x16 a af:AudioFeature . ?x16 af:domain "frequency" . ?x16 af:temporalscale "intraframe" . ?x16 af:dimensionality "one dimensional" . ?x16 af:model "psychoacoustic" } => { ?x16 af:complexity "medium" . ?x16 af:level "perceptual" } . +{ ?x17 a af:AudioFeature . ?x17 af:domain "frequency" . ?x17 af:temporalscale "intraframe" . ?x17 af:level "perceptual" . ?x17 af:model "psychoacoustic" } => { ?x17 af:complexity "medium" . ?x17 af:dimensionality "one dimensional" } . +{ ?x18 a af:AudioFeature . ?x18 af:domain "time" } => { ?x18 af:temporalscale "intraframe" } . +{ ?x19 a af:AudioFeature . ?x19 af:temporalscale "intraframe" . ?x19 af:complexity "low" . ?x19 af:domain "time" } => { ?x19 af:dimensionality "one dimensional" } . +{ ?x20 a af:AudioFeature . ?x20 af:temporalscale "intraframe" . ?x20 af:complexity "medium" . ?x20 af:domain "time" } => { ?x20 af:dimensionality "multi dimensional" } . +{ ?x21 a af:AudioFeature . ?x21 af:domain "frequency" . ?x21 af:temporalscale "intraframe" . ?x21 af:complexity "medium" . ?x21 af:dimensionality "multi dimensional" . ?x21 af:domain "time" } => { ?x21 af:level "perceptual" } . +{ ?x22 a af:AudioFeature . ?x22 af:temporalscale "intraframe" . ?x22 af:dimensionality "one dimensional" . ?x22 af:domain "time" } => { ?x22 af:complexity "low" } . +{ ?x23 a af:AudioFeature . ?x23 af:domain "frequency" . ?x23 af:temporalscale "intraframe" . ?x23 af:complexity "low" . ?x23 af:dimensionality "one dimensional" . ?x23 af:domain "time" } => { ?x23 af:level "perceptual" } . +{ ?x24 a af:AudioFeature . ?x24 af:domain "frequency" . ?x24 af:temporalscale "intraframe" . ?x24 af:dimensionality "multi dimensional" . ?x24 af:level "perceptual" . ?x24 af:domain "time" } => { ?x24 af:complexity "medium" } . +{ ?x25 a af:AudioFeature . ?x25 af:domain "frequency" . ?x25 af:temporalscale "intraframe" . ?x25 af:level "physical" . ?x25 af:domain "time" } => { ?x25 af:domain "cepstral" . ?x25 af:complexity "high" . ?x25 af:dimensionality "multi dimensional" . ?x25 af:model "psychoacoustic" } . +{ ?x26 a af:AudioFeature . ?x26 af:temporalscale "intraframe" . ?x26 af:dimensionality "multi dimensional" . ?x26 af:level "physical" . ?x26 af:domain "time" } => { ?x26 af:domain "cepstral" } . +{ ?x27 a af:AudioFeature . ?x27 af:temporalscale "intraframe" . ?x27 af:complexity "low" . ?x27 af:dimensionality "one dimensional" . ?x27 af:level "physical" . ?x27 af:domain "time" } => { ?x27 af:domain "temporal" } . +{ ?x28 a af:AudioFeature . ?x28 af:domain "frequency" . ?x28 af:temporalscale "intraframe" . ?x28 af:model "psychoacoustic" . ?x28 af:domain "time" } => { ?x28 af:domain "cepstral" . ?x28 af:complexity "high" . ?x28 af:dimensionality "multi dimensional" . ?x28 af:level "physical" } . +{ ?x29 a af:AudioFeature . ?x29 af:domain "cepstral" } => { ?x29 af:temporalscale "intraframe" . ?x29 af:dimensionality "multi dimensional" . ?x29 af:level "physical" . ?x29 af:domain "time" } . +{ ?x32 a af:AudioFeature . ?x32 af:complexity "high" . ?x32 af:temporalscale "intraframe" . ?x32 af:dimensionality "multi dimensional" } => { ?x32 af:domain "cepstral" . ?x32 af:domain "frequency" . ?x32 af:level "physical" . ?x32 af:model "psychoacoustic" . ?x32 af:domain "time" } . +{ ?x37 a af:AudioFeature . ?x37 af:domain "frequency" . ?x37 af:temporalscale "intraframe" . ?x37 af:dimensionality "multi dimensional" . ?x37 af:model "psychoacoustic" } => { ?x37 af:domain "cepstral" . ?x37 af:complexity "high" . ?x37 af:level "physical" . ?x37 af:domain "time" } . +{ ?x38 a af:AudioFeature . ?x38 af:domain "frequency" . ?x38 af:temporalscale "intraframe" . ?x38 af:level "physical" . ?x38 af:model "psychoacoustic" } => { ?x38 af:domain "cepstral" . ?x38 af:complexity "high" . ?x38 af:dimensionality "multi dimensional" . ?x38 af:domain "time" } . +{ ?x39 a af:AudioFeature . ?x39 af:domain "temporal" } => { ?x39 af:temporalscale "intraframe" . ?x39 af:complexity "low" . ?x39 af:dimensionality "one dimensional" . ?x39 af:level "physical" . ?x39 af:domain "time" } .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fuxi/af-base-ontology.n3 Sun Apr 14 17:54:23 2013 +0100 @@ -0,0 +1,90 @@ +@prefix af: <http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . + +af:CepstralDomain a owl:Class ; + rdfs:subClassOf af:Domain . + +af:EigendomainDomain a owl:Class ; + rdfs:subClassOf af:Domain . + +af:FrequencyDomain a owl:Class ; + rdfs:subClassOf af:Domain . + +af:GlobalTemporalscale a owl:Class ; + rdfs:subClassOf af:Temporalscale . + +af:HighComplexity a owl:Class ; + rdfs:subClassOf af:Complexity . + +af:InterframeTemporalscale a owl:Class ; + rdfs:subClassOf af:Temporalscale . + +af:IntraframeTemporalscale a owl:Class ; + rdfs:subClassOf af:Temporalscale . + +af:LowComplexity a owl:Class ; + rdfs:subClassOf af:Complexity . + +af:MediumComplexity a owl:Class ; + rdfs:subClassOf af:Complexity . + +af:ModulationFrequencyDomain a owl:Class ; + rdfs:subClassOf af:Domain . + +af:MultidimensionalDimensionality a owl:Class ; + rdfs:subClassOf af:Dimensionality . + +af:OnedimensionalDimensionality a owl:Class ; + rdfs:subClassOf af:Dimensionality . + +af:PerceptualLevel a owl:Class ; + rdfs:subClassOf af:Level . + +af:PhaseSpaceDomain a owl:Class ; + rdfs:subClassOf af:Domain . + +af:PhysicalLevel a owl:Class ; + rdfs:subClassOf af:Level . + +af:PsychoacousticModel a owl:Class ; + rdfs:subClassOf af:Model . + +af:complexity a owl:ObjectProperty ; + rdfs:domain af:AudioFeature ; + rdfs:range af:Complexity . + +af:dimensionality a owl:ObjectProperty ; + rdfs:domain af:AudioFeature ; + rdfs:range af:Dimensionality . + +af:domain a owl:ObjectProperty ; + rdfs:domain af:AudioFeature ; + rdfs:range af:Domain . + +af:level a owl:ObjectProperty ; + rdfs:domain af:AudioFeature ; + rdfs:range af:Level . + +af:model a owl:ObjectProperty ; + rdfs:domain af:AudioFeature ; + rdfs:range af:Model . + +af:temporalscale a owl:ObjectProperty ; + rdfs:domain af:AudioFeature ; + rdfs:range af:Temporalscale . + +af:Model a owl:Class . + +af:Dimensionality a owl:Class . + +af:Level a owl:Class . + +af:Complexity a owl:Class . + +af:Temporalscale a owl:Class . + +af:AudioFeature a owl:Class . + +af:Domain a owl:Class . +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fuxi/af-base-ontology.rdf Sun Apr 14 17:54:23 2013 +0100 @@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="UTF-8"?> +<rdf:RDF + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" +> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#dimensionality"> + <rdfs:domain rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#AudioFeature"/> + <rdfs:range rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Dimensionality"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#ModulationFrequencyDomain"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Domain"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#PhysicalLevel"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Level"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#CepstralDomain"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Domain"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#AudioFeature"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#PhaseSpaceDomain"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Domain"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#model"> + <rdfs:domain rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#AudioFeature"/> + <rdfs:range rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Model"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#level"> + <rdfs:domain rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#AudioFeature"/> + <rdfs:range rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Level"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#HighComplexity"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Complexity"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Complexity"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#FrequencyDomain"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Domain"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Level"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#IntraframeTemporalscale"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Temporalscale"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#PsychoacousticModel"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Model"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Dimensionality"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#GlobalTemporalscale"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Temporalscale"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#InterframeTemporalscale"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Temporalscale"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#complexity"> + <rdfs:domain rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#AudioFeature"/> + <rdfs:range rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Complexity"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#OnedimensionalDimensionality"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Dimensionality"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#EigendomainDomain"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Domain"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Domain"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#temporalscale"> + <rdfs:domain rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#AudioFeature"/> + <rdfs:range rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Temporalscale"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Temporalscale"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#MultidimensionalDimensionality"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Dimensionality"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Model"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#LowComplexity"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Complexity"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#domain"> + <rdfs:domain rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#AudioFeature"/> + <rdfs:range rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Domain"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#PerceptualLevel"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Level"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#MediumComplexity"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Complexity"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> +</rdf:RDF>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fuxi/af-base-properties.n3 Sun Apr 14 17:54:23 2013 +0100 @@ -0,0 +1,30 @@ +@prefix af: <http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . + +af:complexity a owl:ObjectProperty ; + rdfs:domain af:AudioFeature ; + rdfs:range <http://www.w3.org/2001/XMLSchema#string> . + +af:dimensionality a owl:ObjectProperty ; + rdfs:domain af:AudioFeature ; + rdfs:range <http://www.w3.org/2001/XMLSchema#string> . + +af:domain a owl:ObjectProperty ; + rdfs:domain af:AudioFeature ; + rdfs:range <http://www.w3.org/2001/XMLSchema#string> . + +af:level a owl:ObjectProperty ; + rdfs:domain af:AudioFeature ; + rdfs:range <http://www.w3.org/2001/XMLSchema#string> . + +af:model a owl:ObjectProperty ; + rdfs:domain af:AudioFeature ; + rdfs:range <http://www.w3.org/2001/XMLSchema#string> . + +af:temporalscale a owl:ObjectProperty ; + rdfs:domain af:AudioFeature ; + rdfs:range <http://www.w3.org/2001/XMLSchema#string> . + +af:AudioFeature a owl:Class . +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fuxi/af-base-properties.rdf Sun Apr 14 17:54:23 2013 +0100 @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<rdf:RDF + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" +> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#temporalscale"> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> + <rdfs:domain rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#AudioFeature"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#domain"> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> + <rdfs:domain rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#AudioFeature"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#AudioFeature"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#dimensionality"> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> + <rdfs:domain rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#AudioFeature"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#model"> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> + <rdfs:domain rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#AudioFeature"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#level"> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> + <rdfs:domain rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#AudioFeature"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#complexity"> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> + <rdfs:domain rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#AudioFeature"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + </rdf:Description> +</rdf:RDF>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fuxi/af-base-rules.n3 Sun Apr 14 17:54:23 2013 +0100 @@ -0,0 +1,36 @@ +@prefix af: <http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . + +@forSome :x . { :x af:domain af:Frequency } => { :x af:temporalscale af:Intraframe } . +@forSome :x . { :x af:complexity af:High } => { :x af:dimensionality af:MultiDimensional } . +@forSome :x . { :x af:temporalscale af:Interframe } => { :x af:domain af:ModulationFrequency . :x af:dimensionality af:MultiDimensional . :x af:level af:Perceptual } . +@forSome :x . { :x af:complexity af:Low } => { :x af:temporalscale af:Intraframe } . +@forSome :x . { :x af:domain af:ModulationFrequency } => { :x af:temporalscale af:Interframe . :x af:dimensionality af:MultiDimensional . :x af:level af:Perceptual } . +@forSome :x . { :x af:temporalscale af:Intraframe . :x af:complexity af:Low . :x af:dimensionality af:MultiDimensional } => { :x af:domain af:Frequency } . +@forSome :x . { :x af:dimensionality af:OneDimensional } => { :x af:temporalscale af:Intraframe } . +@forSome :x . { :x af:temporalscale af:Intraframe . :x af:complexity af:Medium . :x af:dimensionality af:OneDimensional } => { :x af:domain af:Frequency . :x af:level af:Perceptual } . +@forSome :x . { :x af:temporalscale af:Intraframe . :x af:level af:Perceptual } => { :x af:domain af:Frequency } . +@forSome :x . { :x af:complexity af:High . :x af:dimensionality af:MultiDimensional . :x af:level af:Perceptual } => { :x af:temporalscale af:Interframe . :x af:domain af:ModulationFrequency } . +@forSome :x . { :x af:level af:Physical } => { :x af:temporalscale af:Intraframe } . +@forSome :x . { :x af:temporalscale af:Intraframe . :x af:complexity af:Medium . :x af:level af:Physical } => { :x af:dimensionality af:MultiDimensional } . +@forSome :x . { :x af:temporalscale af:Intraframe . :x af:dimensionality af:OneDimensional . :x af:level af:Physical } => { :x af:complexity af:Low } . +@forSome :x . { :x af:model af:Psychoacoustic } => { :x af:domain af:Frequency . :x af:temporalscale af:Intraframe } . +@forSome :x . { :x af:domain af:Frequency . :x af:temporalscale af:Intraframe . :x af:complexity af:Medium . :x af:model af:Psychoacoustic } => { :x af:dimensionality af:OneDimensional . :x af:level af:Perceptual } . +@forSome :x . { :x af:domain af:Frequency . :x af:temporalscale af:Intraframe . :x af:dimensionality af:OneDimensional . :x af:model af:Psychoacoustic } => { :x af:complexity af:Medium . :x af:level af:Perceptual } . +@forSome :x . { :x af:domain af:Frequency . :x af:temporalscale af:Intraframe . :x af:level af:Perceptual . :x af:model af:Psychoacoustic } => { :x af:complexity af:Medium . :x af:dimensionality af:OneDimensional } . +@forSome :x . { :x af:domain af:Time } => { :x af:temporalscale af:Intraframe } . +@forSome :x . { :x af:temporalscale af:Intraframe . :x af:complexity af:Low . :x af:domain af:Time } => { :x af:dimensionality af:OneDimensional } . +@forSome :x . { :x af:temporalscale af:Intraframe . :x af:complexity af:Medium . :x af:domain af:Time } => { :x af:dimensionality af:MultiDimensional } . +@forSome :x . { :x af:domain af:Frequency . :x af:temporalscale af:Intraframe . :x af:complexity af:Medium . :x af:dimensionality af:MultiDimensional . :x af:domain af:Time } => { :x af:level af:Perceptual } . +@forSome :x . { :x af:temporalscale af:Intraframe . :x af:dimensionality af:OneDimensional . :x af:domain af:Time } => { :x af:complexity af:Low } . +@forSome :x . { :x af:domain af:Frequency . :x af:temporalscale af:Intraframe . :x af:complexity af:Low . :x af:dimensionality af:OneDimensional . :x af:domain af:Time } => { :x af:level af:Perceptual } . +@forSome :x . { :x af:domain af:Frequency . :x af:temporalscale af:Intraframe . :x af:dimensionality af:MultiDimensional . :x af:level af:Perceptual . :x af:domain af:Time } => { :x af:complexity af:Medium } . +@forSome :x . { :x af:domain af:Frequency . :x af:temporalscale af:Intraframe . :x af:level af:Physical . :x af:domain af:Time } => { :x af:domain af:Cepstral . :x af:complexity af:High . :x af:dimensionality af:MultiDimensional . :x af:model af:Psychoacoustic } . +@forSome :x . { :x af:temporalscale af:Intraframe . :x af:dimensionality af:MultiDimensional . :x af:level af:Physical . :x af:domain af:Time } => { :x af:domain af:Cepstral } . +@forSome :x . { :x af:temporalscale af:Intraframe . :x af:complexity af:Low . :x af:dimensionality af:OneDimensional . :x af:level af:Physical . :x af:domain af:Time } => { :x af:domain af:Temporal } . +@forSome :x . { :x af:domain af:Frequency . :x af:temporalscale af:Intraframe . :x af:model af:Psychoacoustic . :x af:domain af:Time } => { :x af:domain af:Cepstral . :x af:complexity af:High . :x af:dimensionality af:MultiDimensional . :x af:level af:Physical } . +@forSome :x . { :x af:domain af:Cepstral } => { :x af:temporalscale af:Intraframe . :x af:dimensionality af:MultiDimensional . :x af:level af:Physical . :x af:domain af:Time } . +@forSome :x . { :x af:complexity af:High . :x af:temporalscale af:Intraframe . :x af:dimensionality af:MultiDimensional } => { :x af:domain af:Cepstral . :x af:domain af:Frequency . :x af:level af:Physical . :x af:model af:Psychoacoustic . :x af:domain af:Time } . +@forSome :x . { :x af:domain af:Frequency . :x af:temporalscale af:Intraframe . :x af:dimensionality af:MultiDimensional . :x af:model af:Psychoacoustic } => { :x af:domain af:Cepstral . :x af:complexity af:High . :x af:level af:Physical . :x af:domain af:Time } . +@forSome :x . { :x af:domain af:Frequency . :x af:temporalscale af:Intraframe . :x af:level af:Physical . :x af:model af:Psychoacoustic } => { :x af:domain af:Cepstral . :x af:complexity af:High . :x af:dimensionality af:MultiDimensional . :x af:domain af:Time } . +@forSome :x . { :x af:domain af:Temporal } => { :x af:temporalscale af:Intraframe . :x af:complexity af:Low . :x af:dimensionality af:OneDimensional . :x af:level af:Physical . :x af:domain af:Time } .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fuxi/af-ontology.n3 Sun Apr 14 17:54:23 2013 +0100 @@ -0,0 +1,87 @@ +@prefix af: <http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . + +af:CepstralDomain a owl:Class ; + rdfs:subClassOf af:Domain . + +af:DenseOutput a owl:Class ; + rdfs:subClassOf af:Output . + +af:EigendomainDomain a owl:Class ; + rdfs:subClassOf af:Domain . + +af:FrequencyDomain a owl:Class ; + rdfs:subClassOf af:Domain . + +af:GlobalTemporalscale a owl:Class ; + rdfs:subClassOf af:Temporalscale . + +af:InterframeTemporalscale a owl:Class ; + rdfs:subClassOf af:Temporalscale . + +af:IntraframeTemporalscale a owl:Class ; + rdfs:subClassOf af:Temporalscale . + +af:ModulationFrequencyDomain a owl:Class ; + rdfs:subClassOf af:Domain . + +af:MultidimensionalDimensionality a owl:Class ; + rdfs:subClassOf af:Dimensionality . + +af:OnedimensionalDimensionality a owl:Class ; + rdfs:subClassOf af:Dimensionality . + +af:PerceptualLevel a owl:Class ; + rdfs:subClassOf af:Level . + +af:PhaseSpaceDomain a owl:Class ; + rdfs:subClassOf af:Domain . + +af:PhysicalLevel a owl:Class ; + rdfs:subClassOf af:Level . + +af:PsychoacousticModel a owl:Class ; + rdfs:subClassOf af:Model . + +af:SparseOutput a owl:Class ; + rdfs:subClassOf af:Output . + +af:dimensionality a owl:ObjectProperty ; + rdfs:domain af:AudioFeature ; + rdfs:range af:Dimensionality . + +af:domain a owl:ObjectProperty ; + rdfs:domain af:AudioFeature ; + rdfs:range af:Domain . + +af:level a owl:ObjectProperty ; + rdfs:domain af:AudioFeature ; + rdfs:range af:Level . + +af:model a owl:ObjectProperty ; + rdfs:domain af:AudioFeature ; + rdfs:range af:Model . + +af:output a owl:ObjectProperty ; + rdfs:domain af:AudioFeature ; + rdfs:range af:Output . + +af:temporalscale a owl:ObjectProperty ; + rdfs:domain af:AudioFeature ; + rdfs:range af:Temporalscale . + +af:Model a owl:Class . + +af:Dimensionality a owl:Class . + +af:Level a owl:Class . + +af:Output a owl:Class . + +af:Temporalscale a owl:Class . + +af:AudioFeature a owl:Class . + +af:Domain a owl:Class . +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fuxi/af-ontology.rdf Sun Apr 14 17:54:23 2013 +0100 @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="UTF-8"?> +<rdf:RDF + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" +> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#AudioFeature"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#level"> + <rdfs:domain rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#AudioFeature"/> + <rdfs:range rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Level"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#GlobalTemporalscale"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Temporalscale"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#PhaseSpaceDomain"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Domain"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#domain"> + <rdfs:domain rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#AudioFeature"/> + <rdfs:range rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Domain"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#PerceptualLevel"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Level"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Dimensionality"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#MultidimensionalDimensionality"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Dimensionality"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#ModulationFrequencyDomain"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Domain"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Domain"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#InterframeTemporalscale"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Temporalscale"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#output"> + <rdfs:domain rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#AudioFeature"/> + <rdfs:range rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Output"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#PhysicalLevel"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Level"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#OnedimensionalDimensionality"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Dimensionality"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#EigendomainDomain"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Domain"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#temporalscale"> + <rdfs:domain rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#AudioFeature"/> + <rdfs:range rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Temporalscale"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Output"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Model"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#FrequencyDomain"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Domain"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#dimensionality"> + <rdfs:domain rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#AudioFeature"/> + <rdfs:range rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Dimensionality"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#model"> + <rdfs:domain rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#AudioFeature"/> + <rdfs:range rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Model"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#SparseOutput"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Output"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#IntraframeTemporalscale"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Temporalscale"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#PsychoacousticModel"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Model"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Temporalscale"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#DenseOutput"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Output"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Level"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#CepstralDomain"> + <rdfs:subClassOf rdf:resource="http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#Domain"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> +</rdf:RDF>
--- a/fuxi/convertImplicationstoN3.py Thu Apr 04 16:25:39 2013 +0100 +++ b/fuxi/convertImplicationstoN3.py Sun Apr 14 17:54:23 2013 +0100 @@ -1,21 +1,22 @@ import rdflib -from rdflib import Graph, RDF, RDFS, URIRef, Literal, OWL, Namespace, BNode +from rdflib import Graph, RDF, RDFS, URIRef, Literal, OWL, Namespace, BNode, XSD -cat = ["output", "domain", "level", "temporalscale", "dimensionality", "model"] +cat = ["complexity", "domain", "level", "temporalscale", "dimensionality", "model"] val = { - "output": ["Dense", "Sparse"], + "complexity": ["Low", "Medium", "High"], "temporalscale": ["Interframe", "Intraframe", "Global"], - "domain": ["Modulation Frequency", "Frequency", "Cepstral", "Eigendomain", "Phase Space"], + "domain": ["Modulation Frequency", "Frequency", "Cepstral", "Eigendomain", "Phase Space", "Temporal", "Correlation"], "level": ["Perceptual", "Physical"], "dimensionality": ["One-dimensional", "Multi-dimensional"], "model": ["Psychoacoustic"] } basedir = '/Users/alo/MusicOntology/features/' -readpath = basedir + 'fcadata/baseImplications.txt' -writepath = basedir + 'fuxi/af-rules.n3' -factpath = basedir + 'fuxi/af-facts.n3' -ontopath = basedir + 'fuxi/af-ontology.rdf' +readpath = basedir + 'fcadata/baseImplicationsv2.txt' +writepath = basedir + 'fuxi/af-base-literal-rules.n3' +factpath = basedir + 'fuxi/af-base-literal-facts.n3' +#ontopath = basedir + 'fuxi/af-base-ontology.rdf' +ontopath = basedir + 'fuxi/af-base-properties.rdf' cataloguePath = '/Users/alo/MusicOntology/features/af-catalogue.rdf' baseuri = 'http://sovarr.c4dm.eecs.qmul.ac.uk/features/af-ontology#' @@ -47,21 +48,23 @@ premise = row[row.index(">")+2:row.index("==>")-1].split() conclusion = row[row.index("==>")+4:-1].split() if count > 0: - n3 += "@forSome :x . " - n3 += "{ " + var = str(i+1).zfill(2) + n3 += "{ ?x" + var + " a af:AudioFeature . " for pre in premise: prop = "af:"+pre.split("-")[-1] - value = "af:"+(" ".join(pre.split("-")[0:-1]).title().replace(" ", "").replace("-", "")) - n3 += " :x " + prop + " " + value + #value = "af:"+(" ".join(pre.split("-")[0:-1]).title().replace(" ", "").replace("-", "")) + value = " ".join(pre.split("-")[0:-1]) + n3 += ' ?x' + var + ' ' + prop + ' "' + value + '"' n3 += " . " n3 = n3[:-2] + " } => { " for con in conclusion: prop = "af:"+con.split("-")[-1] - value = "af:"+(" ".join(con.split("-")[0:-1]).title().replace(" ", "").replace("-", "")) - n3 += " :x " + prop + " " + value + #value = "af:"+(" ".join(con.split("-")[0:-1]).title().replace(" ", "").replace("-", "")) + value = " ".join(con.split("-")[0:-1]) + n3 += ' ?x' + var + ' ' + prop + ' "' + value + '"' n3 += " . " n3 = n3[:-2] + " } . \n" @@ -86,12 +89,14 @@ )) for obj in cat: + ''' objID = af+obj.title() graph.add(( URIRef(objID), RDF.type, OWL.Class )) + oneof = [] for subcls in val[obj]: subID = af+subcls.replace(" ", "").replace("-", "")+obj.title() graph.add(( @@ -104,7 +109,8 @@ RDFS.subClassOf, URIRef(objID) )) - + oneof.append(subID) + ''' # add object properties propID = af+obj graph.add(( @@ -120,7 +126,7 @@ graph.add(( URIRef(propID), RDFS.range, - URIRef(objID) + XSD.string )) graph.serialize(path) @@ -139,17 +145,19 @@ owl = Namespace('http://www.w3.org/2002/07/owl#') graph.bind('owl', owl) - ns = sourcens['computedIn'] + cns = sourcens['computedIn'] + tns = sourcens['temporalscale'] for su in source.subjects(RDF.type, OWL.Class): - count = sum(1 for _ in source.objects(su,ns)) - if count > 1: + ccount = sum(1 for _ in source.objects(su,cns)) + tcount = sum(1 for _ in source.objects(su,tns)) + if ccount > 0 and tcount > 0 and su.find('MPEG7') == -1: afid = URIRef(af + su.split('/')[-1]) graph.add(( afid, RDF.type, af['AudioFeature'] )) for pr, ob in source.predicate_objects(su): if cat.count(pr.split('/')[-1]) == 1: afpr = URIRef(af + pr.split('/')[-1]) - graph.add((afid, afpr, - af[ob.replace("-", "").title().replace(" ", "") + pr.split('/')[-1].title()] + graph.add((afid, afpr, ob + #af[ob.replace("-", "").title().replace(" ", "") + pr.split('/')[-1].title()] )) graph.serialize(path, format='n3')
--- a/pdfextract/filters.txt Thu Apr 04 16:25:39 2013 +0100 +++ b/pdfextract/filters.txt Sun Apr 14 17:54:23 2013 +0100 @@ -1,13 +1,13 @@ -b Band-pass Filter (Bank) -c Comb Filter (Bank) -o Low-pass Filter +b Bandpass Filter +c Comb Filter +o Lowpass Filter f Windowing -w (Non-) Linear Weighting Function -d Derivation, Difference +w Weighting Function +d Derivation Difference e Energy Spectral Density g Group Delay Function l Logarithm x Exponential Function n Normalization -a Autoregression (Linear Prediction Analysis) +a Autoregression r Cepstral Recursion Formula \ No newline at end of file
--- a/rdfpy/writeBaseOnto.py Thu Apr 04 16:25:39 2013 +0100 +++ b/rdfpy/writeBaseOnto.py Sun Apr 14 17:54:23 2013 +0100 @@ -1,54 +1,46 @@ import rdflib, os, fnmatch, urllib2 -from rdflib import Graph, RDF, RDFS, plugin, URIRef, Literal, OWL, XSD, Namespace +from rdflib import Graph, RDF, RDFS, plugin, URIRef, Literal, OWL, XSD, Namespace, BNode +from InfixOwl.InfixOwl import * from xml.dom.minidom import parseString +def addProperty(graph, propID, type, range, domain, label, comment): + propURI = URIRef(local + propID) + graph.add(( + propURI, + RDF.type, + OWL.ObjectProperty + )) + graph.add(( + propURI, + RDFS.range, + range + )) + graph.add(( + propURI, + RDFS.domain, + domain + )) + graph.add(( + propURI, + VS['term_status'], + Literal("testing") + )) + graph.add(( + propURI, + RDFS.label, + Literal(label) + )) + graph.add(( + propURI, + RDFS.comment, + Literal(comment) + )) + + names = [line.strip() for line in open('pdfextract/names.txt')] cat = [line.strip() for line in open('pdfextract/categories.txt')] -sig = [line.strip() for line in open('pdfextract/sig.txt')] +sig = [line.strip() for line in open('pdfextract/sigv2.txt')] -basedir = '/Users/alo/MusicOntology/features/' - -local = 'http://sovarr.c4dm.eecs.qmul.ac.uk/features/' - -DC = Namespace(u"http://purl.org/dc/elements/1.1/") -VS = Namespace(u"http://www.w3.org/2003/06/sw-vocab-status/ns#") - -graph = Graph() -graph.bind('af', URIRef(local)) -graph.bind('dc', URIRef('http://purl.org/dc/elements/1.1/')) -graph.bind('owl', URIRef('http://www.w3.org/2002/07/owl#')) -graph.bind('xsd', URIRef('http://www.w3.org/2001/XMLSchema#')) -graph.bind('vs', URIRef('http://www.w3.org/2003/06/sw-vocab-status/ns#')) - -graph.add(( - URIRef(''), - RDF.type, - OWL.Ontology -)) - -graph.add(( - URIRef(''), - DC['title'], - Literal("Audio Features Base Ontology") -)) - -graph.add(( - URIRef(''), - OWL.versionInfo, - Literal("Version 0.1") -)) - -graph.add(( - URIRef(''), - DC['description'], - Literal("This is a base ontology for the Audio Features engineering process collected from literature") -)) - -graph.add(( - VS['term_status'], - RDF.type, - OWL.AnnotationProperty -)) i = 0 @@ -103,11 +95,106 @@ domainIndex = 0 compdict = {} +basedir = '/Users/alo/MusicOntology/features/' + +local = 'http://sovarr.c4dm.eecs.qmul.ac.uk/features/' + +DC = Namespace(u"http://purl.org/dc/elements/1.1/") +VS = Namespace(u"http://www.w3.org/2003/06/sw-vocab-status/ns#") + +graph = Graph() +graph.bind('af', URIRef(local)) +graph.bind('dc', URIRef('http://purl.org/dc/elements/1.1/')) +graph.bind('owl', URIRef('http://www.w3.org/2002/07/owl#')) +graph.bind('xsd', URIRef('http://www.w3.org/2001/XMLSchema#')) +graph.bind('vs', URIRef('http://www.w3.org/2003/06/sw-vocab-status/ns#')) + + + +######################## +####### header ######### +######################## + +graph.add(( + URIRef(''), + RDF.type, + OWL.Ontology +)) + +graph.add(( + URIRef(''), + DC['title'], + Literal("Audio Features Base Ontology") +)) + +graph.add(( + URIRef(''), + OWL.versionInfo, + Literal("Version 0.1") +)) + +graph.add(( + URIRef(''), + DC['description'], + Literal("This is a base ontology for the Audio Features engineering process collected from literature") +)) + +graph.add(( + VS['term_status'], + RDF.type, + OWL.AnnotationProperty +)) + + + +############################# +####### computation ######### +############################# + + graph.add(( URIRef(local + 'MathematicalOperation'), RDF.type, OWL.Class )) +graph.add(( + URIRef(local + 'MathematicalOperation'), + OWL.subClassOf, + OWL.Thing +)) + +bnode = BNode() +Restriction(URIRef(local + "operation"),graph,cardinality=Literal(1, datatype=XSD.int),identifier=bnode) +graph.add(( + URIRef(local + 'MathematicalOperation'), + RDFS.subClassOf, + bnode +)) + +bnode = BNode() +Restriction(URIRef(local + "operation"),graph,allValuesFrom=URIRef(local + 'MathematicalOperation'),identifier=bnode) +graph.add(( + URIRef(local + 'MathematicalOperation'), + RDFS.subClassOf, + bnode +)) + +graph.add(( + URIRef(local + "operation"), + RDF.type, + OWL.ObjectProperty +)) +graph.add(( + URIRef(local + "operation"), + RDF.type, + OWL.FunctionalProperty +)) +graph.add(( + URIRef(local + "operation"), + RDFS.domain, + URIRef(local + 'MathematicalOperation') +)) + graph.add(( URIRef(local + 'Filter'), @@ -141,8 +228,96 @@ URIRef(local + 'MathematicalOperation') )) -for filename in ['filters', 'trans', 'aggr']: - compsuper = filename.replace('filters', 'Filter').replace('trans', 'Transformation').replace('aggr', 'Aggregation') + +graph.add(( + URIRef(local + "Computation"), + RDF.type, + OWL.Class +)) + +graph.add(( + URIRef(local + "operation_sequence"), + RDF.type, + OWL.ObjectProperty +)) +graph.add(( + URIRef(local + "operation_sequence"), + RDF.type, + OWL.FunctionalProperty +)) +graph.add(( + URIRef(local + "operation_sequence"), + RDFS.domain, + URIRef(local + "Computation") +)) +graph.add(( + URIRef(local + "operation_sequence"), + RDFS.range, + URIRef(local + 'MathematicalOperation') +)) + +graph.add(( + URIRef(local + "next_operation"), + RDF.type, + OWL.ObjectProperty +)) +graph.add(( + URIRef(local + "next_operation"), + RDF.type, + OWL.FunctionalProperty +)) +graph.add(( + URIRef(local + "next_operation"), + RDFS.domain, + URIRef(local + "MathematicalOperation") +)) +graph.add(( + URIRef(local + "next_operation"), + RDFS.range, + URIRef(local + "MathematicalOperation") +)) + +graph.add(( + URIRef(local + 'LastOperation'), + RDF.type, + OWL.Class +)) +graph.add(( + URIRef(local + 'LastOperation'), + RDFS.subClassOf, + URIRef(local + 'MathematicalOperation') +)) + +bnode = BNode() +Restriction(URIRef(local + "next_operation"),graph,maxCardinality=Literal(0, datatype=XSD.int),identifier=bnode) +graph.add(( + URIRef(local + 'LastOperation'), + RDFS.subClassOf, + bnode +)) + +graph.add(( + URIRef(local + 'OptionalOperation'), + RDF.type, + OWL.Class +)) +graph.add(( + URIRef(local + 'OptionalOperation'), + RDFS.subClassOf, + URIRef(local + 'MathematicalOperation') +)) + +bnode = BNode() +Restriction(URIRef(local + "operation"),graph,minCardinality=Literal(0, datatype=XSD.int),identifier=bnode) +graph.add(( + URIRef(local + 'OptionalOperation'), + RDFS.subClassOf, + bnode +)) + + +for filename in ['filters', 'trans']: + compsuper = filename.replace('filters', 'Filter').replace('trans', 'Transformation') for line in [line.strip() for line in open(basedir + 'pdfextract/' + filename + '.txt')]: compname = line[2:] compidref = URIRef(local + compname.replace(' ', '').replace('(', '').replace(')', '').replace('-', '').replace(',', '')) @@ -163,6 +338,39 @@ )) compdict[line[0]] = compidref + +for line in [line.strip() for line in open(basedir + 'pdfextract/aggrdet.txt')]: + #pair = line.split('\t') + compname = line.split('\t')[1] + compidref = URIRef(local + compname.replace(' ', '')) + graph.add(( + compidref, + RDF.type, + OWL.Class + )) + graph.add(( + compidref, + RDFS.subClassOf, + URIRef(local + "Aggregation") + )) + graph.add(( + compidref, + RDFS.label, + Literal(compname) + )) + compdict[line.split('\t')[0]] = compidref + + +#################################### +####### add feature, signal ######## +#################################### + +graph.add(( + URIRef(local + "AudioFeature"), + RDF.type, + OWL.Class +)) + graph.add(( URIRef(local + 'Signal'), RDF.type, @@ -181,6 +389,13 @@ URIRef(local + 'Signal'), )) + + +################################## +####### feature hierarchy ######## +################################## + + for dom in domains.values(): idref = URIRef(local + dom.capitalize().replace(' ', '') + 'Feature') graph.add(( @@ -257,6 +472,13 @@ )) graph.add(( + URIRef(local + 'SemanticInterpretation'), + RDF.type, + OWL.Class +)) + +### Computational Complexity +graph.add(( URIRef(local + 'ComputationalComplexity'), RDF.type, OWL.Class @@ -292,6 +514,8 @@ URIRef(local + 'ComputationalComplexity') )) + +#### Temporal scale graph.add(( URIRef(local + 'TemporalScale'), RDF.type, @@ -329,6 +553,7 @@ )) +### Application domain graph.add(( URIRef(local + 'ApplicationDomain'), RDF.type, @@ -349,120 +574,120 @@ URIRef(local + 'ApplicationDomain') )) -#properties -graph.add(( - URIRef(local + "application_domain"), - RDF.type, - RDF.Property -)) -graph.add(( - URIRef(local + "application_domain"), - RDFS.range, - URIRef(local + 'ApplicationDomain') -)) -graph.add(( - URIRef(local + "application_domain"), - VS['term_status'], - Literal("testing") -)) -graph.add(( - URIRef(local + "application_domain"), - RDFS.comment, - Literal("application domain property") -)) +############################### +####### add properties ######## +############################### -graph.add(( - URIRef(local + "semantic_interpretation"), - RDF.type, - RDF.Property -)) -graph.add(( - URIRef(local + "semantic_interpretation"), - VS['term_status'], - Literal("testing") -)) - -graph.add(( - URIRef(local + "computational_complexity"), - RDF.type, - RDF.Property -)) -graph.add(( - URIRef(local + "computational_complexity"), - VS['term_status'], - Literal("testing") -)) +# property: application_domain +addProperty( + graph=graph, + propID="application_domain", + type=OWL.ObjectProperty, + range=URIRef(local + 'ApplicationDomain'), + domain=URIRef(local + "AudioFeature"), + label="application_domain property", + comment="application domain: mir, speech, environmental, etc." +) -graph.add(( - URIRef(local + "computational_complexity"), - RDFS.range, - URIRef(local + 'ComputationalComplexity') -)) +# property: semantic_interpretation +addProperty( + graph=graph, + propID="semantic_interpretation", + type=OWL.ObjectProperty, + range=URIRef(local + 'SemanticInterpretation'), + domain=URIRef(local + "AudioFeature"), + label="semantic_interpretation property", + comment="semantic interpretation: physical/perceptual" +) -graph.add(( - URIRef(local + "psychoacoustic_model"), - RDF.type, - RDF.Property -)) -graph.add(( - URIRef(local + "psychoacoustic_model"), - RDFS.range, - XSD.Boolean -)) -graph.add(( - URIRef(local + "psychoacoustic_model"), - VS['term_status'], - Literal("testing") -)) +# property: computational_complexity +addProperty( + graph=graph, + propID="computational_complexity", + type=OWL.ObjectProperty, + range=URIRef(local + 'ComputationalComplexity'), + domain=URIRef(local + "AudioFeature"), + label="computational_complexity property", + comment="computational complexity: high/medium/low" +) +# property: psychoacoustic_model +addProperty( + graph=graph, + propID="psychoacoustic_model", + type=OWL.ObjectProperty, + range=XSD.Boolean, + domain=URIRef(local + "AudioFeature"), + label="psychoacoustic_model property", + comment="psychoacoustic model: true/false" +) -graph.add(( - URIRef(local + "dimensions"), - RDF.type, - RDF.Property -)) -graph.add(( - URIRef(local + "dimensions"), - RDFS.range, - XSD.Integer -)) -graph.add(( - URIRef(local + "dimensions"), - RDFS.range, - URIRef(local + 'ParametrizedDimensions') -)) +# property: temporal_scale +addProperty( + graph=graph, + propID="temporal_scale", + type=OWL.ObjectProperty, + range=URIRef(local + 'TemporalScale'), + domain=URIRef(local + "AudioFeature"), + label="temporal_scale", + comment="temporal scale: global, interframe, intraframe" +) -graph.add(( - URIRef(local + "temporal_scale"), - RDF.type, - RDF.Property -)) -graph.add(( - URIRef(local + "temporal_scale"), - RDFS.range, - URIRef(local + 'TemporalScale') -)) - +# property: dimensions +addProperty( + graph=graph, + propID="dimensions", + type=OWL.ObjectProperty, + range=XSD.Integer, + domain=URIRef(local + "AudioFeature"), + label="dimensions property", + comment="dimensions: an integer value" +) + +# property: computation +addProperty( + graph=graph, + propID="computation", + type=OWL.ObjectProperty, + range=URIRef(local + 'Computation'), + domain=URIRef(local + "AudioFeature"), + label="computation", + comment="computation: a sequence of mathematical operations" +) + + +############################# +####### add features ######## +############################# + for name in names: - id = local + (name.replace(' ','').replace('-','')) + basename = name.replace(' ','').replace('-','').replace('4Hz', '') + id = local + basename if name == order[domainIndex]: domain = domains[order[domainIndex]] domainIndex += 1 + + graph.add(( + URIRef(id), + RDF.type, + URIRef(local + "AudioFeature") + )) - graph.add(( URIRef(id), - URIRef('http://www.w3.org/1999/02/22-rdf-syntax-ns#type'), - OWL.Class - )) +# graph.add(( +# URIRef(id), +# RDF.type, +# OWL.Class +# )) graph.add(( URIRef(id), VS['term_status'], Literal("testing") )) - + if domain == "frequency": if word[1] == 'Y': temp = URIRef(local + 'FrequencyDomainPerceptualFeature') @@ -573,14 +798,60 @@ )) steps = sig[i].split(' ') + + compid = URIRef(local + basename + "_computation") + + graph.add((compid, RDF.type, URIRef(local+"Computation"))) - for key in steps: - graph.add(( - URIRef(id), - URIRef(local + 'computation'), - compdict[key] - )) - + nSteps = 0 + + for item in steps: + if item != "(" and item != ")" and item != "[" and item != "]": + nSteps = nSteps + 1 + + iIndex = -1 + isOptional = False + for cIndex in range(len(steps)): + if steps[cIndex] == "(" or steps[cIndex] == ")" or steps[cIndex] == "[" or steps[cIndex] == "]": + if steps[cIndex] == "(": + isOptional = True + else: + iIndex = iIndex + 1 + opid = URIRef(local + basename + '_operation_sequence_' + str(iIndex + 1)) + isa = compdict[steps[cIndex]] + graph.add(( + opid, + RDF.type, + isa + )) + if iIndex == 0: + graph.add(( + compid, + URIRef(local + 'operation_sequence'), + opid + )) + if iIndex < nSteps-1: + graph.add(( + opid, + URIRef(local + "next_operation"), + URIRef(local + basename + '_operation_sequence_' + str(iIndex + 2)) + )) + else: + graph.add(( + opid, + RDF.type, + URIRef(local + 'LastOperation') + )) + if isOptional: + graph.add(( + opid, + RDF.type, + URIRef(local + 'OptionalOperation') + )) + isOptional = False + + graph.add(( URIRef(id), URIRef(local+'computation'), compid )) + if name.find('MPEG-7') >= 0: graph.add(( URIRef(id), @@ -605,5 +876,5 @@ -graph.serialize('/Users/alo/MusicOntology/features/baseOnto.n3', format='n3') -graph.serialize('/Users/alo/MusicOntology/features/baseOnto.rdf') +graph.serialize('/Users/alo/MusicOntology/features/rdfonto/baseOntoV2.n3', format='n3') +graph.serialize('/Users/alo/MusicOntology/features/rdfonto/baseOntoV2.rdf')
--- a/rdfpy/writeMIRToolboxOnto.py Thu Apr 04 16:25:39 2013 +0100 +++ b/rdfpy/writeMIRToolboxOnto.py Sun Apr 14 17:54:23 2013 +0100 @@ -84,10 +84,16 @@ for su in source.subjects(RDF.type, RDFS.Resource): idref = URIRef(local + su.split('/')[-1]) +# graph.add(( +# idref, +# RDF.type, +# OWL.Class +# )) + graph.add(( idref, RDF.type, - OWL.Class + URIRef(local+"AudioFeature") )) count=sum(1 for _ in source.objects(su, URIRef(local+'tag')))
--- a/rdfpy/writeMarsyasOnto.py Thu Apr 04 16:25:39 2013 +0100 +++ b/rdfpy/writeMarsyasOnto.py Sun Apr 14 17:54:23 2013 +0100 @@ -66,10 +66,16 @@ for su in source.subjects(RDF.type, RDFS.Resource): idref = URIRef(local+su.split('/')[-1]) +# graph.add(( +# idref, +# RDF.type, +# OWL.Class +# )) + graph.add(( idref, RDF.type, - OWL.Class + URIRef(local+"AudioFeature") )) count = sum(1 for _ in source.objects(su,URIRef('file:///Users/alo/MusicOntology/features/rdf/type')))