net.sourceforge.nite.datainspection.timespan
Class TimelineDiscretizationClassificationFactory

java.lang.Object
  extended by net.sourceforge.nite.datainspection.timespan.TimelineDiscretizationClassificationFactory

public class TimelineDiscretizationClassificationFactory
extends java.lang.Object

This class makes classifications from an annotation by discretizing the timeline into items and assigning Values to each item based on the NomElementToValueDelegate applied to the annotation element with the largest time overlap with the item.

This class works in two step:
1) make a list of items ('time spans') that are to be used for all annotators
2) given the list of Items, and a segmentlist, and a NomElementToValueDelegate, generate a Classification.


Constructor Summary
TimelineDiscretizationClassificationFactory()
           
 
Method Summary
static java.util.List generateDiscretizedItems(double endtime, double th)
          Make a list of items ('time spans') that are to be used for all annotators by discretizing the timeline from 0 to endtime (usually obtained from getCorpusEndTime) in segments of 'th' duration.
static Classification makeClassification(java.util.List items, java.util.List segmentList, NOMElementToValueDelegate nomElementToValue)
          Given the list of Items generated by generateDiscretizedItems, and a segmentlist, and a NomElementToValueDelegate, generate a Classification.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimelineDiscretizationClassificationFactory

public TimelineDiscretizationClassificationFactory()
Method Detail

generateDiscretizedItems

public static java.util.List generateDiscretizedItems(double endtime,
                                                      double th)
Make a list of items ('time spans') that are to be used for all annotators by discretizing the timeline from 0 to endtime (usually obtained from getCorpusEndTime) in segments of 'th' duration.


makeClassification

public static Classification makeClassification(java.util.List items,
                                                java.util.List segmentList,
                                                NOMElementToValueDelegate nomElementToValue)
Given the list of Items generated by generateDiscretizedItems, and a segmentlist, and a NomElementToValueDelegate, generate a Classification. The segmentlist is assumed to be sorted on start time.