edu.stanford.nlp.trees.international.arabic
Class ArabicTreeNormalizer

java.lang.Object
  extended by edu.stanford.nlp.trees.TreeNormalizer
      extended by edu.stanford.nlp.trees.BobChrisTreeNormalizer
          extended by edu.stanford.nlp.trees.international.arabic.ArabicTreeNormalizer
All Implemented Interfaces:
TreeTransformer, Serializable

public class ArabicTreeNormalizer
extends BobChrisTreeNormalizer

Normalizes both terminals and non-terminals in Penn Arabic Treebank (ATB) trees. Among the normalizations that can be performed:

Author:
Roger Levy, Anna Rafferty, Spence Green
See Also:
Serialized Form

Nested Class Summary
static class ArabicTreeNormalizer.ArabicEmptyFilter
          Remove traces and pronoun deletion markers.
 
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
ArabicTreeNormalizer()
           
ArabicTreeNormalizer(boolean retainNPTmp)
           
ArabicTreeNormalizer(boolean retainNPTmp, boolean markPRDverb)
           
ArabicTreeNormalizer(boolean retainNPTmp, boolean markPRDverb, boolean changeNoLabels)
           
ArabicTreeNormalizer(boolean retainNPTmp, boolean markPRDverb, boolean changeNoLabels, boolean retainNPSbj, boolean retainPPClr)
           
 
Method Summary
 String normalizeNonterminal(String category)
          Normalizes a nonterminal contents.
 Tree normalizeWholeTree(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, normalizeTerminal, transformTree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArabicTreeNormalizer

public ArabicTreeNormalizer(boolean retainNPTmp,
                            boolean markPRDverb,
                            boolean changeNoLabels,
                            boolean retainNPSbj,
                            boolean retainPPClr)

ArabicTreeNormalizer

public ArabicTreeNormalizer(boolean retainNPTmp,
                            boolean markPRDverb,
                            boolean changeNoLabels)

ArabicTreeNormalizer

public ArabicTreeNormalizer(boolean retainNPTmp,
                            boolean markPRDverb)

ArabicTreeNormalizer

public ArabicTreeNormalizer(boolean retainNPTmp)

ArabicTreeNormalizer

public ArabicTreeNormalizer()
Method Detail

normalizeNonterminal

public String normalizeNonterminal(String category)
Description copied from class: BobChrisTreeNormalizer
Normalizes a nonterminal contents. This implementation strips functional tags, etc. and interns the nonterminal.

Overrides:
normalizeNonterminal in class BobChrisTreeNormalizer
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: BobChrisTreeNormalizer
Normalize 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 does work for a null tree.

Overrides:
normalizeWholeTree in class BobChrisTreeNormalizer
Parameters:
tree - The tree to be normalized
tf - the TreeFactory to create new nodes (if needed)
Returns:
Tree the normalized tree


Stanford NLP Group