|
Pep 0.4 API Documentation | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<ParserOption> edu.osu.ling.pep.ParserOption
public enum ParserOption
An option used to configure an Earley parser
.
Enum Constant Summary | |
---|---|
IGNORE_TERMINAL_CASE
Signals whether an Earley parser should ignore the case of terminal tokens. |
|
PREDICT_FOR_PRETERMINALS
Whether the Earley parser should make predictions based on pre-terminal categories. |
Method Summary | |
---|---|
Boolean |
getDefaultValue()
Gets the default value for this option. |
String |
toString()
Gets a string representation of this Earley parser option. |
static ParserOption |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static ParserOption[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final ParserOption IGNORE_TERMINAL_CASE
true
, the tokens John
and john
will be treated as equivalent, but they will be
treated as distinct tokens if this is set to false
.
Default value: Boolean.FALSE
.
public static final ParserOption PREDICT_FOR_PRETERMINALS
true
, the parser will make a
prediction for every grammar entry where the left side is a category
it has predicted for and the right side is a terminal. For example,
in a grammar where the pre-terminal category N
can expand
to dog
, boy
, or man
and a rule
exists where NP
expands to Det N
, the parser
will predict
N -> dog
N -> boy
N -> man
NP
(or any other rule that
can expand to N
).
Alternatively, if this option is specified as false
, the
parser will only complete (as opposed to predict) for those
terminals it actually encounters in the input string, instead
of predicting for every possible terminal.
Default value: Boolean.FALSE
.
Method Detail |
---|
public Boolean getDefaultValue()
public String toString()
toString
in class Enum<ParserOption>
OPTION_NAME=option default value
public static ParserOption valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified namepublic static final ParserOption[] values()
for(ParserOption c : ParserOption.values()) System.out.println(c);
|
Pep: Pep is an Earley parser | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the overview file.