|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdanbikel.parser.lang.AbstractTraining
danbikel.parser.chinese.Training
public class Training
Provides methods for language-specific processing of Chinese training parse
trees. This class uses all the defaults provided by the superclass
AbstractTraining
, exccept that it overrides
AbstractTraining.relabelSubjectlessSentences(Sexp)
.
Field Summary |
---|
Fields inherited from class danbikel.parser.lang.AbstractTraining |
---|
addGapInfo, argAugmentations, argContexts, argNonterminals, baseNP, canonicalAugDelimSym, defaultArgAugmentation, delimAndGapStr, delimAndGapStrLen, gapAugmentation, headFinder, headPostSym, headPreSym, headSym, metadataPropertyPrefix, nodesToPrune, NP, prunedPreterms, prunedPunctuation, relabelHeadChildrenAsArgs, repairBaseNPs, semTagArgStopSet, traceTag, treebank, wordsToPrune |
Constructor Summary | |
---|---|
Training()
The default constructor, to be invoked by Language . |
Method Summary | |
---|---|
protected Sexp |
combineRightSiblingsOfDe5(Sexp tree)
A method to create a new node if a DEG or DEC preterminal has more than one right sibling. |
static void |
main(String[] args)
Test driver for this class. |
Sexp |
relabelSubjectlessSentences(Sexp tree)
We override AbstractTraining.relabelSubjectlessSentences(Sexp) so
that we can make the definition of a subjectless sentence
slightly more restrictive: a subjectless sentence not only must
have a null-element child that is marked with the subject
augmentation, but also its head must be a VP (this is
Mike Collins’ definition of a subjectless sentence). |
protected Sexp |
unrepairBaseNPs(Sexp tree)
A method to un-do the transformation provided by AbstractTraining.repairBaseNPs(Sexp) (for inclusion
in an overridden definition of
AbstractTraining.postProcess(Sexp) ,
but currently unused by this class). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Training() throws IOException
Language
.
This constructor looks for a resource named by the property
metadataPropertyPrefix + language
where
metadataPropertyPrefix
is the value of the constant AbstractTraining.metadataPropertyPrefix
and language
is the value of
Settings.get(Settings.language)
. For example, the property for
English is "parser.training.metadata.english"
.
IOException
- if there is a problem reading the metadata resourceMethod Detail |
---|
public Sexp relabelSubjectlessSentences(Sexp tree)
AbstractTraining.relabelSubjectlessSentences(Sexp)
so
that we can make the definition of a subjectless sentence
slightly more restrictive: a subjectless sentence not only must
have a null-element child that is marked with the subject
augmentation, but also its head must be a VP (this is
Mike Collins’ definition of a subjectless sentence).
relabelSubjectlessSentences
in interface Training
relabelSubjectlessSentences
in class AbstractTraining
tree
- the parse tree in which to relabel subjectless sentences
tree
that was passed in, with
subjectless sentence nodes relabeledTreebank.isSentence(Symbol)
,
Treebank.subjectAugmentation()
,
Treebank.isNullElementPreterminal(Sexp)
,
Treebank.subjectlessSentenceLabel()
protected Sexp unrepairBaseNPs(Sexp tree)
AbstractTraining.repairBaseNPs(Sexp)
(for inclusion
in an overridden definition of
AbstractTraining.postProcess(Sexp)
,
but currently unused by this class).
tree
- the tree whose sentences that are right siblings of base NP
nodes are to be re-inserted as rightmost children of their
respective base NP nodes
protected Sexp combineRightSiblingsOfDe5(Sexp tree)
tree
- the tree in which to combine right siblings of DEG or
DEC nodes into a newly-created parent
public static void main(String[] args)
args
- usage: [-risan] <filename> where
-r | raise punctuation |
-i | identify arguments |
-s | relabel subjectless sentences |
-a | strip nonterminal augmentations |
-n | add/relabel base NPs |
|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |