de.dfki.lt.mary.dbselection
Class SelectionFunction

java.lang.Object
  extended by de.dfki.lt.mary.dbselection.SelectionFunction

public class SelectionFunction
extends java.lang.Object

Selects sentences from a given set using the greedy algorithm. At each step, the most useful sentence is added to the set of selected sentences. Selection is stopped when the stop criterion is reached. Usefulness of sentences is determined by CoverageDefinition.

Author:
Anna Hunecke

Constructor Summary
SelectionFunction()
          Build a new Selection Function
 
Method Summary
 void select(java.util.List selectedFilenames, CoverageDefinition coverageDefinition, java.io.PrintWriter logFile, java.lang.String[] basenameList, boolean holdVectorsInMemory, boolean verbose)
          Select a set of vectors according to their usefulness which is defined by the coverageDefinition.
 boolean stopIsOkay(java.lang.String stopString)
          Check, if given stop criterion is okay.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectionFunction

public SelectionFunction()
Build a new Selection Function

Method Detail

stopIsOkay

public boolean stopIsOkay(java.lang.String stopString)
Check, if given stop criterion is okay. At the same time, initialise stop criterion as this SelectionFunction's stop criterion

Parameters:
stopString - the stop criterion
Returns:
true if stopString can be parsed, false otherwise

select

public void select(java.util.List selectedFilenames,
                   CoverageDefinition coverageDefinition,
                   java.io.PrintWriter logFile,
                   java.lang.String[] basenameList,
                   boolean holdVectorsInMemory,
                   boolean verbose)
            throws java.io.IOException
Select a set of vectors according to their usefulness which is defined by the coverageDefinition. Stop, when the stop criterion is reached

Parameters:
selectedFilenames - the list of selected filenames
coverageDefinition - the coverage definition for the feature vectors
logFile - the logFile to document the progress
basenameList - the list of filenames of the sentences
holdVectorsInMemory - if true, get vectors from coverage definition, if false, read vectors from disk
verbose - print output also to command line
Throws:
java.io.IOException