comparison tools/segmentation/generics.lisp @ 74:a98c2adfd420

initial segmentation idea darcs-hash:20070713100751-f76cc-2cc54f680199ee8f8e7f620c5d46d1e4f059baec.gz
author David Lewis <d.lewis@gold.ac.uk>
date Fri, 13 Jul 2007 11:07:51 +0100
parents
children 6b2ac9eef629
comparison
equal deleted inserted replaced
73:c9b0739d8dd6 74:a98c2adfd420
1 (in-package "AMUSE-SEGMENTATION")
2
3 (defgeneric boundary-strength (segmenter object composition)
4 (:documentation "Returns a (positive?) number, with 0
5 indicating no boundary. N.B. Whether this indicates a boundary
6 before or after moment-designator is the responsibility of the
7 caller to know."))
8
9 (defgeneric boundary-time (segmenter object)
10 (:documentation "Returns the moment that the value returned by
11 boundary-strength applies to if object is the second input to
12 the method. Essentially, this distinguishes between segmenters
13 that look to the beginning of a note and those that look at the
14 end.")
15
16 (defgeneric ground-truth-segmenter-before (composition)
17 (:documentation "Returns the segmenter that, when put into
18 boundary-strength, supplies segmentation as given in a
19 ground truth for the composition. N.B. This needs to return one
20 segmenter only, so in cases of multiple ground truths, this
21 method must arbitrate."))
22
23 (defgeneric ground-truth-segmenter-after (composition)
24 (:documentation "Returns the segmenter that, when put into
25 boundary-strength-after, supplies segmentation as given in a
26 ground truth for the composition. N.B. This needs to return one
27 segmenter only, so in cases of multiple ground truths, this
28 method must arbitrate."))
29
30 (defgeneric ground-truth-segmenterp (segmenter)) ;; prob not necessary?
31 (defgeneric segments-beforep (segmenter))
32 (defgeneric segments-afterp (segmenter)
33 (:method (s) (not (segments-beforep s))))