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 class
StringParser.Par
Parameterization class.
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.regex.Matcher
comment
Comment pattern.(package private) boolean
trimWhitespace
Flag 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 void
cleanup()
Perform cleanup operations after parsing.MultipleObjectsBundle
parse(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:Parser
Returns a list of the objects parsed from the specified input stream.
-
-