view pyspark/test_transform_n3s/tuningstats_cla_trans_win.n3 @ 0:e34cf1b6fe09 tip

commit
author Daniel Wolff
date Sat, 20 Feb 2016 18:14:24 +0100
parents
children
line wrap: on
line source
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix dml:     <http://dml.org/dml/cla#> .
@prefix vamp:    <http://purl.org/ontology/vamp/> .
@prefix dc:      <http://purl.org/dc/elements/1.1/> .

# This file defines an ontology, which also imports the vamp plugin ontology
<dmlclaOntology.n3> a owl:Ontology;
    owl:imports <http://vamp-plugins.org/rdf/plugins/qm-vamp-plugins> .

# Our highest level class is a dml:Transform
dml:Transform a owl:Class .
dml:CollectionLevelAnalysis rdfs:subClassOf dml:Transform .

dml:type rdfs:subPropertyOf rdf:type .

vamp:Transform rdfs:subClassOf dml:Transform .

dml:input a owl:ObjectProperty .
dml:output a owl:ObjectProperty .

# A CollectionLevelKeyTonic is a CollectionLevelAnalysis,
# it requires at least one input, and these inputs
# will all be outputs from the qm keydetector vamp plugin.
dml:CollectionLevelKeyTonic rdfs:subClassOf dml:CollectionLevelAnalysis ;
    owl:equivalentClass [ a owl:restriction ;
    					  owl:onProperty dml:collectionLevelKeyTonicInput ;
    					  owl:minCardinality 1] ;
    owl:equivalentClass [ a owl:restriction ;
    					  owl:onProperty dml:collectionLevelKeyTonicOutput ;
    					  owl:cardinality 1] .
    					  
dml:collectionLevelKeyTonicInput rdfs:subPropertyOf dml:input ;
	rdfs:range <http://vamp-plugins.org/rdf/plugins/qm-vamp-plugins#qm-keydetector_output_tonic> .

dml:collectionLevelKeyTonicOutput rdfs:subPropertyOf dml:output ;
	rdfs:range dml:KeyTonicHistogram .

# A (Tonic) Key Histogram is defined as:
dml:KeyTonicHistogram a vamp:DenseOutput ;
    vamp:identifier       "keytonichistogram" ;
    dc:title              "Key Tonic Histogram" ;
    dc:description        "Histogram of estimated tonic key (from C major = 1 to B major = 12)."  ;
    vamp:fixed_bin_count  "true" ;
    vamp:unit             "" ;
    vamp:bin_count        12 ;
    vamp:bin_names        ( "C" "C#" "D" "D#" "E" "F" "F#" "G" "G#" "A" "A#" "B");
    owl:intersectionOf (
			[ a owl:Restriction;
			  owl:onProperty dml:sample_count ;
			  owl:cardinality 1]
			[ a owl:Restriction;
			  owl:onProperty dml:bin ;
			  owl:cardinality 12] ) .

dml:bin a owl:ObjectProperty ;
	rdfs:range dml:Bin .
	
dml:Bin a owl:Class;
		owl:intersectionOf (
			[ a owl:Restriction;
			  owl:onProperty dml:bin_number ;
			  owl:cardinality 1]
			[ a owl:Restriction;
			  owl:onProperty dml:bin_value ;
			  owl:cardinality 1] ) .

dml:bin_number a owl:DatatypeProperty ;
	rdfs:range xsd:integer .

dml:bin_value a owl:DatatypeProperty .

dml:sample_count a owl:DatatypeProperty ;
	rdfs:range xsd:integer .

# A Key Histogram is defined as:
dml:KeyTonicHistogram a vamp:DenseOutput ;
    vamp:identifier       "keyhistogram" ;
    dc:title              "Key Histogram" ;
    dc:description        "Histogram of estimated key (from C major = 1 to B major = 12 and C minor = 13 to B minor = 24)."  ;
    vamp:fixed_bin_count  "true" ;
    vamp:unit             "" ;
    vamp:bin_count        24 ;
    vamp:bin_names        ( "Cmaj" "C#maj" "Dmaj" "D#maj" "Emaj" "Fmaj" "F#maj" "Gmaj" "G#maj" "Amaj" "A#maj" "Bmaj" "Cmin" "C#min" "Dmin" "D#min" "Emin" "Fmin" "F#min" "Gmin" "G#min" "Amin" "A#min" "Bmin");
    dml:sample_count [ a xsd:integer] ;
    owl:equivalentClass [ a owl:restriction ;
                            owl:onProperty dml:bin ;
                            owl:cardinality 24] .



# A CollectionLevelTuningFrequencyStatistics is a CollectionLevelAnalysis,
# it requires at least one input, and these inputs
# will all be outputs from the silvet transcription plugin.
dml:CollectionLevelTuningFrequencyStatistics rdfs:subClassOf dml:CollectionLevelAnalysis ;
    owl:equivalentClass [ a owl:restriction ;
    					  owl:onProperty dml:collectionLevelTuningFrequencyStatisticsInput ;
    					  owl:minCardinality 1] ;
    owl:equivalentClass [ a owl:restriction ;
    					  owl:onProperty dml:collectionLevelTuningFrequencyStatisticsOutput ;
    					  owl:cardinality 1] .

dml:collectionLevelTuningFrequencyStatisticsInput rdfs:subPropertyOf dml:input ;
	rdfs:range <http://vamp-plugins.org/rdf/plugins/silvet#silvet_output_notes> .

dml:collectionLevelTuningFrequencyStatisticsOutput rdfs:subPropertyOf dml:output ;
	rdfs:range dml:TuningFrequencyStatistics .

# TuningFrequencyStatistics is defined as:
dml:TuningFrequencyStatistics a vamp:DenseOutput ;
    vamp:identifier       "tuningfrequencystatistics" ;
    dc:title              "Tuning Frequency Statistics" ;
    dc:description        "Statistics of Estimated Tuning Frequency including mean, standard deviation and histogram" ;
    owl:intersectionOf (
			[ a owl:Restriction;
			  owl:onProperty dml:mean ;
			  owl:cardinality 1]
			[ a owl:Restriction;
			  owl:onProperty dml:std_dev ;
			  owl:cardinality 1] 
                        [ a owl:Restriction;
			  owl:onProperty dml:bin ;
			  owl:cardinality 100]) .

dml:mean a owl:DatatypeProperty ;
	rdfs:range xsd:float .

dml:std_dev a owl:DatatypeProperty ;
	rdfs:range xsd:float .

# Some example data
_:cl_tuning_statistics dml:type dml:CollectionLevelTuningFrequencyStatistics ;
#    dml:input <file:///mnt/audio/Bruckner/_Analysis/silvet_settings_slow_nonfinetune_allinstruments.n3_1db32/020A-H03614XXXXXX-0104A0_vamp_silvet_silvet_notes.n3> ;
#    dml:input <file:///mnt/audio/Bruckner/_Analysis/silvet_settings_slow_nonfinetune_allinstruments.n3_1db32/020A-H03799XXXXXX-0103A0_vamp_silvet_silvet_notes.n3> ;
  dml:input <file:///D:/mirg/Pitch_Analysis/026A-1CL0001773XX-0100A0_vamp_silvet_silvet_notes.csv> ;
# dml:input <file:///D:/mirg/Pitch_Analysis/026A-1CL0002164XX-0100A0_vamp_silvet_silvet_notes.n3> ;
    dml:input <file:///D:/mirg/Pitch_Analysis/026A-1CL0001773XX-0100A0_vamp_silvet_silvet_notes.n3> .