Class FrenchTreeNormalizer
- java.lang.Object
-
- edu.stanford.nlp.trees.TreeNormalizer
-
- edu.stanford.nlp.trees.BobChrisTreeNormalizer
-
- edu.stanford.nlp.trees.international.french.FrenchTreeNormalizer
-
- All Implemented Interfaces:
TreeTransformer,Serializable,Function<Tree,Tree>
public class FrenchTreeNormalizer extends BobChrisTreeNormalizer
Prepares French Treebank trees for parsing.- Author:
- Spence Green
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFrenchTreeNormalizer.FrenchAOverAFilter-
Nested classes/interfaces inherited from class edu.stanford.nlp.trees.BobChrisTreeNormalizer
BobChrisTreeNormalizer.AOverAFilter, BobChrisTreeNormalizer.EmptyFilter
-
-
Field Summary
-
Fields inherited from class edu.stanford.nlp.trees.BobChrisTreeNormalizer
aOverAFilter, emptyFilter, tlp
-
-
Constructor Summary
Constructors Constructor Description FrenchTreeNormalizer(boolean ccTagset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringnormalizeNonterminal(String category)Normalizes a nonterminal contents.StringnormalizeTerminal(String terminal)Normalizes a leaf contents.TreenormalizeWholeTree(Tree tree, TreeFactory tf)Normalize a whole tree -- one can assume that this is the root.-
Methods inherited from class edu.stanford.nlp.trees.BobChrisTreeNormalizer
cleanUpLabel, transformTree
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface edu.stanford.nlp.trees.TreeTransformer
apply
-
-
-
-
Method Detail
-
normalizeTerminal
public String normalizeTerminal(String terminal)
Description copied from class:BobChrisTreeNormalizerNormalizes a leaf contents. This implementation interns the leaf.- Overrides:
normalizeTerminalin classBobChrisTreeNormalizer- Parameters:
terminal- The String that decorates the leaf- Returns:
- The normalized form of this leaf String
-
normalizeNonterminal
public String normalizeNonterminal(String category)
Description copied from class:BobChrisTreeNormalizerNormalizes a nonterminal contents. This implementation strips functional tags, etc. and interns the nonterminal.- Overrides:
normalizeNonterminalin classBobChrisTreeNormalizer- Parameters:
category- The String that decorates this nonterminal node- Returns:
- The normalized form of this nonterminal String
-
normalizeWholeTree
public Tree normalizeWholeTree(Tree tree, TreeFactory tf)
Description copied from class:BobChrisTreeNormalizerNormalize a whole tree -- one can assume that this is the root. This implementation deletes empty elements (ones with nonterminal tag label '-NONE-') from the tree, and splices out unary A over A nodes. It assumes that it is not given a null tree, but it may return one if there are no real words.- Overrides:
normalizeWholeTreein classBobChrisTreeNormalizer- Parameters:
tree- The tree to be normalizedtf- the TreeFactory to create new nodes (if needed)- Returns:
- The normalized tree. May be null which means to not use this tree at all.
-
-