edu.stanford.nlp.international.arabic.pipeline
Class ATBCorrector

java.lang.Object
  extended by edu.stanford.nlp.international.arabic.pipeline.ATBCorrector
All Implemented Interfaces:
TreeTransformer

public class ATBCorrector
extends Object
implements TreeTransformer

Makes ATB trees consistent with ArabicTreebankLanguagePack. Specifically, it removes sentence-initial punctuation, and constraints sentence-final punctuation to be one of [.!?].

Also cleans up some of the headlines, and other weirdly tokenized sentences.

Author:
Spence Green

Constructor Summary
ATBCorrector()
           
 
Method Summary
static void main(String[] args)
           
 Tree transformTree(Tree t)
          Does whatever one needs to do to a particular tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ATBCorrector

public ATBCorrector()
Method Detail

transformTree

public Tree transformTree(Tree t)
Description copied from interface: TreeTransformer
Does whatever one needs to do to a particular tree. This routine is passed a whole Tree, and could itself work recursively, but the canonical usage is to invoke this method via the Tree.transform() method, which will apply the transformer in a bottom-up manner to each local Tree, and hence the implementation of TreeTransformer should merely examine and change a local (one-level) Tree.

Specified by:
transformTree in interface TreeTransformer
Parameters:
t - A tree. Classes implementing this interface can assume that the tree passed in is not null.
Returns:
the transformed Tree

main

public static void main(String[] args)
Parameters:
args -


Stanford NLP Group