| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectir.classifiers.ExamplesConstructor
ir.classifiers.DirectoryExamplesConstructor
public class DirectoryExamplesConstructor
Creates a list of examples from a directory where file names contain the category name as a substring.
| Field Summary | |
|---|---|
| protected  java.lang.String[] | categoriesArray of categories (classes) in the data | 
| protected  java.lang.String | dirNameName of the directory where the example files are stored. | 
| protected  short | docTypeType of document (text or HTML) | 
| protected  boolean | stemFlag set to stem words to their root forms | 
| Constructor Summary | |
|---|---|
| DirectoryExamplesConstructor(java.lang.String dirName,
                             java.lang.String[] categories)Construct an ExamplesConstructor for the given directory and category labels | |
| DirectoryExamplesConstructor(java.lang.String dirName,
                             java.lang.String[] categories,
                             short docType,
                             boolean stem)Construct an ExamplesConstructor for the given directory and category labels | |
| Method Summary | |
|---|---|
|  int | findClassID(java.lang.String name)Finds the class ID from the name of the document file. | 
|  java.util.List<Example> | getExamples()Get the examples from the directory, process them into HashMapVector's and label them with the correct category label | 
| static void | main(java.lang.String[] args)Test loading a sample directory of examples | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected java.lang.String dirName
protected short docType
protected boolean stem
protected java.lang.String[] categories
| Constructor Detail | 
|---|
public DirectoryExamplesConstructor(java.lang.String dirName,
                                    java.lang.String[] categories,
                                    short docType,
                                    boolean stem)
public DirectoryExamplesConstructor(java.lang.String dirName,
                                    java.lang.String[] categories)
| Method Detail | 
|---|
public java.util.List<Example> getExamples()
getExamples in class ExamplesConstructorpublic int findClassID(java.lang.String name)
public static void main(java.lang.String[] args)
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||