weka.core.converters
Class ClassTreeArffFileParser
java.lang.Object
weka.core.converters.AbstractClassHierarchyParser
weka.core.converters.ClassTreeParser
weka.core.converters.ClassTreeFileParser
weka.core.converters.ClassTreeArffFileParser
- All Implemented Interfaces:
- ClassHierarchyParser, java.io.Serializable
- public class ClassTreeArffFileParser
- extends ClassTreeFileParser
Works as a ClassTreeFileParser, but expects the file
to be of arff-format and to contain
a comment-line providing as keyword "@hierarchy"
followed by a hierarchy-string suitable for
ClassTreeParser.setEncodedHierarchy(String encodedHierarchy)
.
Thus the line should present three space separated tokens:
the comment-symbol, the key-word, the encoded hierarchy.
- Author:
- Arthur Zimek
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
HIERARCHY
|
static java.util.regex.Pattern |
SPACE
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SPACE
public static final java.util.regex.Pattern SPACE
HIERARCHY
public static final java.lang.String HIERARCHY
- See Also:
- Constant Field Values
ClassTreeArffFileParser
public ClassTreeArffFileParser()
parseFile
protected java.lang.String parseFile(java.io.File file)
- Expects the given file to be of arff-format and to contain
a comment-line providing as keyword @hierarchy
followed by a hierarchy-string suitable for
ClassTreeParser.setEncodedHierarchy(String encodedHierarchy)
.
Thus the line should present three space separated tokens:
the comment-symbol, the key-word, the encoded hierarchy.
- Overrides:
parseFile
in class ClassTreeFileParser
- Parameters:
file
- a file containing as first line an encoded hierarchy
- Returns:
- String ht eencodedHierarchy as provided by the given file
- See Also:
ClassTreeFileParser.parseFile(java.io.File)