Package opennlp.tools.ml.model
Class EventFields
java.lang.Object
opennlp.tools.ml.model.EventFields
Field delimiters and messages shared by
FileEventStream,
RealValueFileEventStream and SimpleEventStreamBuilder.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final recordThe fields of one event line. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final StringMessage for a blank line; the line is filled in.private static final char[]Space, tab, carriage return, line feed and form feed. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static String[]Splits on runs of space, tab, carriage return, line feed, and form feed.(package private) static EventFields.EventLineSplits an event line into its outcome and contexts, seesplit(String).
-
Field Details
-
MISSING_OUTCOME
Message for a blank line; the line is filled in.- See Also:
-
SEPARATORS
private static final char[] SEPARATORSSpace, tab, carriage return, line feed and form feed.
-
-
Constructor Details
-
EventFields
private EventFields()
-
-
Method Details
-
split
Splits on runs of space, tab, carriage return, line feed, and form feed. Other characters remain in the fields, and no empty fields are produced.- Parameters:
text- The event text, already checked fornullby the caller.- Returns:
- The fields in order.
-
splitLine
Splits an event line into its outcome and contexts, seesplit(String).- Parameters:
line- The event line, already checked fornullby the caller.- Returns:
- The first field as outcome and the other fields as contexts.
- Throws:
InvalidFormatException- Thrown iflineis empty or contains only separators.
-