Package elki.datasource.parser
Class StringParser
- java.lang.Object
-
- elki.datasource.parser.StringParser
-
- All Implemented Interfaces:
Parser
@Title("String Parser") @Description("Parses new line separated strings") public class StringParser extends java.lang.Object implements Parser
Parser that loads a text file for use with string similarity measures. The parser produces two relations: the first of type String, the second of type label list, which contains the same data for convenience.- Since:
- 0.6.0
- Author:
- Felix Stahlberg, Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStringParser.ParParameterization class.
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.regex.MatchercommentComment pattern.(package private) booleantrimWhitespaceFlag to trim whitespace.
-
Constructor Summary
Constructors Constructor Description StringParser(java.util.regex.Pattern comment, boolean trimWhitespace)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanup()Perform cleanup operations after parsing.MultipleObjectsBundleparse(java.io.InputStream in)Returns a list of the objects parsed from the specified input stream.
-
-
-
Method Detail
-
parse
public MultipleObjectsBundle parse(java.io.InputStream in)
Description copied from interface:ParserReturns a list of the objects parsed from the specified input stream.
-
-