public class TreeAutomatonInputCodec extends InputCodec<TreeAutomaton>
S! -> r(NP, VP) [0.3]where S, NP, and VP are states and r is a terminal symbol. S is a final state, as indicated by the exclamation mark. Each rule can optionally be assigned a weight in square brackets; in the example, the weight is 0.3. Rules that do not have an explicit weight get a default weight of 1. Drop the brackets if r is a zero-place symbol, i.e. a rule for leaves looks like this:
D -> a
.Constructor and Description |
---|
TreeAutomatonInputCodec() |
Modifier and Type | Method and Description |
---|---|
TreeAutomaton |
read(InputStream is)
Reads an object from an input stream.
|
addOptions, getAllInputCodecs, getInputCodecByExtension, getInputCodecByName, getInputCodecByNameOrExtension, getInputCodecs, getMetadata, getOption, hasTrueOption, main, read, setOption, setProgressListener
public TreeAutomaton read(InputStream is) throws CodecParseException, IOException
InputCodec
read
in class InputCodec<TreeAutomaton>
CodecParseException
- if an error occurred while decoding
the input stream into an objectIOException
- if an error occurred while reading
data from the input streamCopyright © 2017. All rights reserved.