public class NPTmpRetainingTreeNormalizer extends BobChrisTreeNormalizer
S < (/^NP-SBJ/ < -NONE-) --> S-G
Modifier and Type | Class and Description |
---|---|
static class |
NPTmpRetainingTreeNormalizer.NPTmpAdvRetainingTreeReaderFactory
Implementation of TreeReaderFactory, mainly for convenience of
constructing by reflection.
|
static class |
NPTmpRetainingTreeNormalizer.NPTmpRetainingTreeReaderFactory
Implementation of TreeReaderFactory, mainly for convenience of
constructing by reflection.
|
BobChrisTreeNormalizer.AOverAFilter, BobChrisTreeNormalizer.EmptyFilter
Modifier and Type | Field and Description |
---|---|
static int |
TEMPORAL_9 |
static int |
TEMPORAL_ACL03PCFG |
static int |
TEMPORAL_ALL_NP |
static int |
TEMPORAL_ALL_NP_AND_PP |
static int |
TEMPORAL_ALL_NP_EVEN_UNDER_PP |
static int |
TEMPORAL_ALL_NP_PP_ADVP |
static int |
TEMPORAL_ALL_TERMINALS |
static int |
TEMPORAL_ANY_TMP_PERCOLATED |
static int |
TEMPORAL_NONE |
static int |
TEMPORAL_NP_AND_PP_WITH_NP_HEAD |
aOverAFilter, emptyFilter, tlp
Constructor and Description |
---|
NPTmpRetainingTreeNormalizer() |
NPTmpRetainingTreeNormalizer(int temporalAnnotation,
boolean doSGappedStuff) |
NPTmpRetainingTreeNormalizer(int temporalAnnotation,
boolean doSGappedStuff,
int leaveItAll,
boolean doAdverbialNP) |
NPTmpRetainingTreeNormalizer(int temporalAnnotation,
boolean doSGappedStuff,
int leaveItAll,
boolean doAdverbialNP,
HeadFinder headFinder)
Create a TreeNormalizer that maintains some functional annotations,
particularly those involving temporal annotation.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
cleanUpLabel(java.lang.String label)
Remove things like hyphened functional tags and equals from the
end of a node label.
|
Tree |
normalizeWholeTree(Tree tree,
TreeFactory tf)
Normalize a whole tree -- one can assume that this is the root.
|
normalizeNonterminal, normalizeTerminal, transformTree
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply
public static final int TEMPORAL_NONE
public static final int TEMPORAL_ACL03PCFG
public static final int TEMPORAL_ANY_TMP_PERCOLATED
public static final int TEMPORAL_ALL_TERMINALS
public static final int TEMPORAL_ALL_NP
public static final int TEMPORAL_ALL_NP_AND_PP
public static final int TEMPORAL_NP_AND_PP_WITH_NP_HEAD
public static final int TEMPORAL_ALL_NP_EVEN_UNDER_PP
public static final int TEMPORAL_ALL_NP_PP_ADVP
public static final int TEMPORAL_9
public NPTmpRetainingTreeNormalizer()
public NPTmpRetainingTreeNormalizer(int temporalAnnotation, boolean doSGappedStuff)
public NPTmpRetainingTreeNormalizer(int temporalAnnotation, boolean doSGappedStuff, int leaveItAll, boolean doAdverbialNP)
public NPTmpRetainingTreeNormalizer(int temporalAnnotation, boolean doSGappedStuff, int leaveItAll, boolean doAdverbialNP, HeadFinder headFinder)
temporalAnnotation
- One of the constants:
TEMPORAL_NONE (no temporal annotation kept on trees),
TEMPORAL_ACL03PCFG (temporal annotation on NPs, and percolated down
to head of constituent until and including POS tag),
TEMPORAL_ANY_TMP_PERCOLATED (temporal annotation on any phrase is
kept and percolated via head chain to and including POS tag),
TEMPORAL_ALL_TERMINALS (temporal annotation is kept on NPs, and
is placed on all POS tag daughters of that NP (but is not
percolated down a head chain through phrasal categories),
TEMPORAL_ALL_NP (temporal annotation on NPs, and it is percolated
down via the head chain, but only through NPs: annotation stops
at either a POS tag (which is annotated) or a non-NP head
(which isn't annotated)),
TEMPORAL_ALL_NP_AND_PP (keeps temporal annotation on NPs and PPs,
and it is percolated down via the head chain, but only through
NPs: annotation stops at either a POS tag (which is annotated)
or a non-NP head (which isn't annotated)).
TEMPORAL_NP_AND_PP_WITH_NP_HEAD (like TEMPORAL_ALL_NP_AND_PP
except an NP is regarded as the head of a PP)
TEMPORAL_ALL_NP_EVEN_UNDER_PP (like TEMPORAL_ALL_NP, but a PP-TMP
annotation above an NP is 'passed down' to annotate that NP
as temporal (but the PP itself isn't marked))
TEMPORAL_ALL_NP_PP_ADVP (keeps temporal annotation on NPs, PPs, and
ADVPs
and it is percolated down via the head chain, but only through
those categories: annotation stops at either a POS tag
(which is annotated)
or a non-NP/PP/ADVP head (which isn't annotated)),
TEMPORAL_9 (annotates like the previous one but
does all NP inside node, and their children if
pre-pre-terminal rather than only if head).doSGappedStuff
- Leave -SBJ marking on subject NP and then mark
S-G sentences with a gapped subject.leaveItAll
- 0 means the usual stripping of functional tags and indices;
1 leaves all functional tags but still strips indices;
2 leaves everythingdoAdverbialNP
- Leave -ADV functional tag on adverbial NPs and
maybe add it to their headheadFinder
- A head finder that is used with some of the
options for temporalAnnotationprotected java.lang.String cleanUpLabel(java.lang.String label)
cleanUpLabel
in class BobChrisTreeNormalizer
label
- The label from the treebankpublic Tree normalizeWholeTree(Tree tree, TreeFactory tf)
normalizeWholeTree
in class BobChrisTreeNormalizer
tree
- The tree to be normalizedtf
- the TreeFactory to create new nodes (if needed)