|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdanbikel.parser.Collins
public class Collins
Provides a nonterminal mapping scheme that, when applied to previously-generated modifiers, allows for emulation of Michael Collins' modifier-generation model.
N.B.: ThemapPrevMod(Symbol)
static method has been
deprecated. Classes should use the more flexible mechanism provided by the
NTMapper
class.
map(Symbol)
,
NTMapper
,
Settings.prevModMapperClass
Field Summary | |
---|---|
static Symbol |
conjSym
The conjunction equivalence class. |
static Symbol |
miscSym
The miscellaneous equivalence class. |
static Symbol |
puncSym
The punctuation equivalence class. |
static Symbol |
startSym
The start symbol equivalence class. |
Constructor Summary | |
---|---|
Collins()
|
Method Summary | |
---|---|
Symbol |
map(Symbol nonterminal)
Maps the specified nonterminal to one of four equivalence classes. |
static Symbol |
mapPrevMod(Symbol prevMod)
Deprecated. Classes should now use NTMapper.map(Symbol) , since the
NTMapper class provides the flexibility of using an
internal NonterminalMapper instance created at run-time
according to the Settings.prevModMapperClass setting. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Symbol startSym
public static final Symbol conjSym
public static final Symbol puncSym
public static final Symbol miscSym
Constructor Detail |
---|
public Collins()
Method Detail |
---|
public static Symbol mapPrevMod(Symbol prevMod)
NTMapper.map(Symbol)
, since the
NTMapper
class provides the flexibility of using an
internal NonterminalMapper
instance created at run-time
according to the Settings.prevModMapperClass
setting.
prevMod
- the previous modifier to be mapped
NTMapper
,
NonterminalMapper
,
Settings.prevModMapperClass
public Symbol map(Symbol nonterminal)
map(nonterminal) =
startSym
if nonterminal == Language.training().startSym()
conjSym
if Language.treebank().isConjunction(nonterminal)
puncSym
if Language.treebank().isPunctuation(nonterminal)
miscSym
otherwise
map
in interface NonterminalMapper
nonterminal
- the nonterminal to be mapped
Training.startSym()
,
Treebank.isConjunction(Symbol)
,
Treebank.isPunctuation(Symbol)
|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |