Mercurial > hg > amuse
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/segmentation/generics.lisp Fri Jul 13 11:07:51 2007 +0100 @@ -0,0 +1,33 @@ +(in-package "AMUSE-SEGMENTATION") + +(defgeneric boundary-strength (segmenter object composition) + (:documentation "Returns a (positive?) number, with 0 + indicating no boundary. N.B. Whether this indicates a boundary + before or after moment-designator is the responsibility of the + caller to know.")) + +(defgeneric boundary-time (segmenter object) + (:documentation "Returns the moment that the value returned by + boundary-strength applies to if object is the second input to + the method. Essentially, this distinguishes between segmenters + that look to the beginning of a note and those that look at the + end.") + +(defgeneric ground-truth-segmenter-before (composition) + (:documentation "Returns the segmenter that, when put into + boundary-strength, supplies segmentation as given in a + ground truth for the composition. N.B. This needs to return one + segmenter only, so in cases of multiple ground truths, this + method must arbitrate.")) + +(defgeneric ground-truth-segmenter-after (composition) + (:documentation "Returns the segmenter that, when put into + boundary-strength-after, supplies segmentation as given in a + ground truth for the composition. N.B. This needs to return one + segmenter only, so in cases of multiple ground truths, this + method must arbitrate.")) + +(defgeneric ground-truth-segmenterp (segmenter)) ;; prob not necessary? +(defgeneric segments-beforep (segmenter)) +(defgeneric segments-afterp (segmenter) + (:method (s) (not (segments-beforep s))))