org.apache.ctakes.relationextractor.data
Class Splitter
java.lang.Object
org.apache.ctakes.relationextractor.data.Splitter
public class Splitter
- extends java.lang.Object
Randomly split a set of files in a directory into three sets: train, dev, and test.
- Author:
- dmitriy dligach
Constructor Summary |
Splitter(double trainProportion,
double devProportion)
Specify percentages of the split. |
Splitter(int trainSize,
int devSize,
int testSize)
Specify the size of each set. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ALLFILELOC
public final java.lang.String ALLFILELOC
- See Also:
- Constant Field Values
TRAINLOC
public final java.lang.String TRAINLOC
- See Also:
- Constant Field Values
DEVLOC
public final java.lang.String DEVLOC
- See Also:
- Constant Field Values
TESTLOC
public final java.lang.String TESTLOC
- See Also:
- Constant Field Values
totalSize
int totalSize
trainSize
int trainSize
devSize
int devSize
testSize
int testSize
allFileNames
java.util.List<java.lang.String> allFileNames
Splitter
public Splitter(double trainProportion,
double devProportion)
- Specify percentages of the split.
Splitter
public Splitter(int trainSize,
int devSize,
int testSize)
- Specify the size of each set.
createDirectories
public void createDirectories()
throws java.io.IOException
- Throws:
java.io.IOException
split
public void split()
throws java.io.IOException
- Throws:
java.io.IOException
main
public static void main(java.lang.String[] args)
throws java.io.IOException
- Throws:
java.io.IOException