|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--mark.nlp.data.Instance
|
+--mark.nlp.data.TextInstance
An instance that contains text. The class follows the Immutable design pattern.
| Constructor Summary | |
TextInstance(int category,
java.io.File file)
Initializes the text instance. |
|
TextInstance(int category,
java.lang.String text)
Initializes the text instance. |
|
| Method Summary | |
static TextInstance[] |
extract(ArgHelper args,
boolean required,
java.lang.String prefix,
java.io.FileFilter ff,
FileCategorySet catSet,
boolean shuffle)
Extracts from a set of text files from a mark.core.args.ArgHelper a set of text instances. |
java.lang.String |
text()
Returns the text instance's text. |
| Methods inherited from class mark.nlp.data.Instance |
category, setCategory |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TextInstance(int category,
java.lang.String text)
category - the instance's category.text - the instance's text.
public TextInstance(int category,
java.io.File file)
throws java.lang.Exception
category - the instance's category.file - the text file from which to obatain the text.| Method Detail |
public java.lang.String text()
public static TextInstance[] extract(ArgHelper args,
boolean required,
java.lang.String prefix,
java.io.FileFilter ff,
FileCategorySet catSet,
boolean shuffle)
throws java.lang.Exception
args - the ArgHelper.required - whether the argument is required.prefix - the name of the argument (if more than one of same type).ff - the file filter.catSet - the category set which determines the category of each
instance.shuffle - if true, then shuffles the list before returning it.
java.lang.Exception - if there is no file set and required.ArgUtil.extractFileSet(mark.core.args.ArgHelper, boolean, java.lang.String, java.io.FileFilter)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||