public class TiburonTreeAutomatonInputCodec extends InputCodec<TreeAutomaton>
q -> NP(x1 x2) # 0.8where q, x1, and x2 are states and NP is a terminal symbol. The rules may be assigned weights by an optional annotation like "# 0.8". Final states are defined by listing them before the first rule. Anything from a percent sign (%) to the end of the line is a comment, and therefore ignored.
Tiburon allows rules like "q -> S(subj was prednom)", where subj and prednom are states, but "was" is a terminal symbol. These rules are automatically split into smaller rules "q -> S(subj,_q_1,prednom)" and "_q_1 -> was" in the tree automaton.
Constructor and Description |
---|
TiburonTreeAutomatonInputCodec() |
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.