# HG changeset patch # User David Lewis # Date 1184603617 -3600 # Node ID 9f2282a2644e039f571df590215c73b7cb089b00 # Parent dc01096751af7a0a2d8265a0a060ab3ff064ca42 Skeleton for segmentation interface darcs-hash:20070716163337-f76cc-f7db9c490fab20196922118d8acd3235b4802840.gz diff -r dc01096751af -r 9f2282a2644e tools/segmentation/classes.lisp --- a/tools/segmentation/classes.lisp Fri Jul 13 17:34:37 2007 +0100 +++ b/tools/segmentation/classes.lisp Mon Jul 16 17:33:37 2007 +0100 @@ -10,3 +10,6 @@ (:documentation "A segmenter binding to moments after a boundary.")) (defclass ground-truth-segmenter (segmenter) ()) +(defclass segmentation () () + (:documenation "Base class for delivering the results of + segmentation")) diff -r dc01096751af -r 9f2282a2644e tools/segmentation/generics.lisp --- a/tools/segmentation/generics.lisp Fri Jul 13 17:34:37 2007 +0100 +++ b/tools/segmentation/generics.lisp Mon Jul 16 17:33:37 2007 +0100 @@ -35,3 +35,38 @@ (:method ((s after-segmenter)) nil)) (defgeneric segments-afterp (segmenter) (:method (s) (not (segments-beforep s)))) + +(defgeneric make-segmentation (segmenter composition) + (:documentation "Basic way to generate segmentation + object. N.B. Requires segmenter to do more work than + hitherto.")) + +(defgeneric ground-truth-segmentation (segmentation) + (:documentation "Returns the relevant ground-truth for + evaluating segmentation")) +(defgeneric (setf ground-truth-segmentation) (segmentation value) + (:documentation "Sets the segmentation to be used as ground + truth by segmentation to value")) +(defgeneric precision (segmentation) + (:documenatation "Returns the precision ratio for segmentation + when compared with the (ground-truth-segmentation + segmentation)")) +(defgeneric recall (segmentation) + (:documenatation "Returns the precision ratio for segmentation + when compared with the (ground-truth-segmentation + segmentation)")) +(defgeneric fall-out (segmentation) + (:documenatation "Returns the precision ratio for segmentation + when compared with the (ground-truth-segmentation + segmentation)")) +(defgeneric F-measure (segmentation) + (:documenatation "Returns the precision ratio for segmentation + when compared with the (ground-truth-segmentation + segmentation)")) + +(defgeneric boundary-list (segmentation) + (:documentation "Returns a list of moments corresponding to the + boundary points of the segmentation")) +(defgeneric segment-list (segmentation) + (:documentation "Returns a list of anchored periods + corresponding to the segments resulting from the segmentation")) \ No newline at end of file