org.apache.ctakes.relationextractor.data
Class Splitter

java.lang.Object
  extended by 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

Field Summary
 java.lang.String ALLFILELOC
           
(package private)  java.util.List<java.lang.String> allFileNames
           
 java.lang.String DEVLOC
           
(package private)  int devSize
           
 java.lang.String TESTLOC
           
(package private)  int testSize
           
(package private)  int totalSize
           
 java.lang.String TRAINLOC
           
(package private)  int trainSize
           
 
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.
 
Method Summary
 void createDirectories()
           
static void main(java.lang.String[] args)
           
 void split()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

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.

Method Detail

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