edu.cmu.minorthird.text
Class SimpleTextLoader

java.lang.Object
  extended by edu.cmu.minorthird.text.SimpleTextLoader

public class SimpleTextLoader
extends java.lang.Object

A no options loader. It checks the given file/string and does one of two things: 1) if Directory - load each file as a document assuming that labels are embedded 2) if file - load each line as a document assuming the first word is a document name

Author:
ksteppe

Field Summary
 boolean labelFile
           
 
Constructor Summary
SimpleTextLoader()
           
 
Method Summary
 boolean isLabelFile()
           
 TextLabels load(java.io.File file)
           
static TextLabels load(java.io.File file, boolean externalLabelFile)
           
 TextLabels load(java.lang.String fileName)
           
static TextLabels load(java.lang.String fileName, boolean externalLabelFile)
           
 void setLabelFile(boolean labelFile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

labelFile

public boolean labelFile
Constructor Detail

SimpleTextLoader

public SimpleTextLoader()
Method Detail

load

public static TextLabels load(java.io.File file,
                              boolean externalLabelFile)

load

public static TextLabels load(java.lang.String fileName,
                              boolean externalLabelFile)

load

public TextLabels load(java.io.File file)

load

public TextLabels load(java.lang.String fileName)

isLabelFile

public boolean isLabelFile()

setLabelFile

public void setLabelFile(boolean labelFile)