public class NegraPennTreeNormalizer extends TreeNormalizer
| Modifier and Type | Field and Description |
|---|---|
protected TreebankLanguagePack |
tlp |
| Constructor and Description |
|---|
NegraPennTreeNormalizer() |
NegraPennTreeNormalizer(TreebankLanguagePack tlp) |
NegraPennTreeNormalizer(TreebankLanguagePack tlp,
int nodeCleanup) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
cleanUpLabel(String label)
Remove things like hyphened functional tags and equals from the
end of a node label.
|
boolean |
getInsertNPinPP() |
String |
nonUnaryRootSymbol() |
String |
normalizeNonterminal(String category)
Normalizes a nonterminal contents.
|
String |
normalizeTerminal(String leaf)
Normalizes a leaf contents.
|
Tree |
normalizeWholeTree(Tree tree,
TreeFactory tf)
Normalize a whole tree -- one can assume that this is the
root.
|
String |
rootSymbol() |
void |
setInsertNPinPP(boolean b) |
protected final TreebankLanguagePack tlp
public NegraPennTreeNormalizer()
public NegraPennTreeNormalizer(TreebankLanguagePack tlp)
public NegraPennTreeNormalizer(TreebankLanguagePack tlp, int nodeCleanup)
public String rootSymbol()
public String nonUnaryRootSymbol()
public void setInsertNPinPP(boolean b)
public boolean getInsertNPinPP()
public String normalizeTerminal(String leaf)
normalizeTerminal in class TreeNormalizerleaf - The String that decorates the leafpublic String normalizeNonterminal(String category)
normalizeNonterminal in class TreeNormalizercategory - The String that decorates this nonterminal nodepublic Tree normalizeWholeTree(Tree tree, TreeFactory tf)
normalizeWholeTree in class TreeNormalizertree - The tree to be normalizedtf - the TreeFactory to create new nodes (if needed)