edu.stanford.nlp.parser.lexparser
Class ArabicTreebankParserParams

java.lang.Object
  extended by edu.stanford.nlp.parser.lexparser.AbstractTreebankParserParams
      extended by edu.stanford.nlp.parser.lexparser.ArabicTreebankParserParams
All Implemented Interfaces:
TreebankLangParserParams, TreebankFactory, java.io.Serializable

public class ArabicTreebankParserParams
extends AbstractTreebankParserParams

A TreebankLangParserParams implementing class for the Penn Arabic Treebank. The baseline feature set works with either UTF-8 or Buckwalter input, although the behavior of some unused features depends on the input encoding.

Author:
Roger Levy, Christopher Manning, Spence Green
See Also:
Serialized Form

Nested Class Summary
protected  class ArabicTreebankParserParams.ArabicSubcategoryStripper
           
 
Nested classes/interfaces inherited from class edu.stanford.nlp.parser.lexparser.AbstractTreebankParserParams
AbstractTreebankParserParams.AnnotatePunctuationFunction, AbstractTreebankParserParams.RemoveGFSubcategoryStripper, AbstractTreebankParserParams.SubcategoryStripper
 
Field Summary
 
Fields inherited from class edu.stanford.nlp.parser.lexparser.AbstractTreebankParserParams
evalGF, inputEncoding, outputEncoding, tlp
 
Constructor Summary
ArabicTreebankParserParams()
           
 
Method Summary
 TreeTransformer collinizer()
          The collinizer eliminates punctuation
 TreeTransformer collinizerEvalb()
          Stand-in collinizer does nothing to the tree.
 java.util.List<HasWord> defaultTestSentence()
          Return a default sentence for the language (for testing).
 DiskTreebank diskTreebank()
          returns a DiskTreebank appropriate to the treebank source
 void display()
          display language-specific settings
 HeadFinder headFinder()
          The HeadFinder to use for your treebank.
 Lexicon lex()
          Returns a lexicon for Arabic.
 Lexicon lex(Options.LexOptions op)
          Returns a lexicon for Arabic.
static void main(java.lang.String[] args)
           
 MemoryTreebank memoryTreebank()
          returns a MemoryTreebank appropriate to the treebank source
 int setOptionFlag(java.lang.String[] args, int i)
          Some options for setOptionFlag:
 java.lang.String[] sisterSplitters()
          Returns the splitting strings used for selective splits.
 TreeTransformer subcategoryStripper()
          Returns a TreeTransformer that retains categories according to the following options supported by setOptionFlag:
 Tree transformTree(Tree t, Tree root)
          This method does language-specific tree transformations such as annotating particular nodes with language-relevant features.
 TreeReaderFactory treeReaderFactory()
          Creates an ArabicTreeReaderFactory with parameters set via options passed in from the command line.
 
Methods inherited from class edu.stanford.nlp.parser.lexparser.AbstractTreebankParserParams
dependencyGrammarExtractor, dependencyObjectify, getInputEncoding, getOutputEncoding, isEvalGF, MLEDependencyGrammarSmoothingParams, parsevalObjectify, parsevalObjectify, ppAttachmentEval, processHeadWord, pw, pw, setEvalGF, setEvaluateGrammaticalFunctions, setInputEncoding, setOutputEncoding, setupForEval, testMemoryTreebank, treebank, treebankLanguagePack, treeTokenizerFactory, typedDependencyClasser, typedDependencyObjectify, unorderedTypedDependencyObjectify, unorderedUntypedDependencyObjectify, untypedDependencyObjectify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArabicTreebankParserParams

public ArabicTreebankParserParams()
Method Detail

treeReaderFactory

public TreeReaderFactory treeReaderFactory()
Creates an ArabicTreeReaderFactory with parameters set via options passed in from the command line.

Returns:
An ArabicTreeReaderFactory

memoryTreebank

public MemoryTreebank memoryTreebank()
Description copied from class: AbstractTreebankParserParams
returns a MemoryTreebank appropriate to the treebank source

Specified by:
memoryTreebank in interface TreebankLangParserParams
Specified by:
memoryTreebank in class AbstractTreebankParserParams

diskTreebank

public DiskTreebank diskTreebank()
Description copied from class: AbstractTreebankParserParams
returns a DiskTreebank appropriate to the treebank source

Specified by:
diskTreebank in interface TreebankLangParserParams
Specified by:
diskTreebank in class AbstractTreebankParserParams

headFinder

public HeadFinder headFinder()
Description copied from class: AbstractTreebankParserParams
The HeadFinder to use for your treebank.

Specified by:
headFinder in interface TreebankLangParserParams
Specified by:
headFinder in class AbstractTreebankParserParams

lex

public Lexicon lex()
Returns a lexicon for Arabic. At the moment this is just a BaseLexicon.

Overrides:
lex in class AbstractTreebankParserParams
Returns:
A lexicon

lex

public Lexicon lex(Options.LexOptions op)
Returns a lexicon for Arabic. At the moment this is just a BaseLexicon.

Specified by:
lex in interface TreebankLangParserParams
Overrides:
lex in class AbstractTreebankParserParams
Parameters:
op - Lexicon options
Returns:
A Lexicon

defaultTestSentence

public java.util.List<HasWord> defaultTestSentence()
Return a default sentence for the language (for testing). The example is in UTF-8.

Returns:
A default sentence of the language

subcategoryStripper

public TreeTransformer subcategoryStripper()
Returns a TreeTransformer that retains categories according to the following options supported by setOptionFlag:

-retainNPTmp Retain temporal NP marking on NPs. -retainNPSbj Retain NP subject function tags -markPRDverbs Retain PRD verbs.

Specified by:
subcategoryStripper in interface TreebankLangParserParams
Overrides:
subcategoryStripper in class AbstractTreebankParserParams

collinizer

public TreeTransformer collinizer()
The collinizer eliminates punctuation

Specified by:
collinizer in interface TreebankLangParserParams
Specified by:
collinizer in class AbstractTreebankParserParams
Returns:
A TreeTransformer that performs adjustments to trees to delete or equivalence class things not evaluated in the parser performance evaluation.

collinizerEvalb

public TreeTransformer collinizerEvalb()
Stand-in collinizer does nothing to the tree.

Specified by:
collinizerEvalb in interface TreebankLangParserParams
Specified by:
collinizerEvalb in class AbstractTreebankParserParams

sisterSplitters

public java.lang.String[] sisterSplitters()
Description copied from class: AbstractTreebankParserParams
Returns the splitting strings used for selective splits.

Specified by:
sisterSplitters in interface TreebankLangParserParams
Specified by:
sisterSplitters in class AbstractTreebankParserParams
Returns:
An array containing ancestor-annotated Strings: categories should be split according to these ancestor annotations.

transformTree

public Tree transformTree(Tree t,
                          Tree root)
Description copied from class: AbstractTreebankParserParams
This method does language-specific tree transformations such as annotating particular nodes with language-relevant features. Such parameterizations should be inside the specific TreebankLangParserParams class. This method is recursively applied to each node in the tree (depth first, left-to-right), so you shouldn't write this method to apply recursively to tree members. This method is allowed to (and in some cases does) destructively change the input tree t. It changes both labels and the tree shape.

Specified by:
transformTree in interface TreebankLangParserParams
Specified by:
transformTree in class AbstractTreebankParserParams
Parameters:
t - The input tree (with non-language specific annotation already done, so you need to strip back to basic categories)
root - The root of the current tree (can be null for words)
Returns:
The fully annotated tree node (with daughters still as you want them in the final result)

display

public void display()
Description copied from class: AbstractTreebankParserParams
display language-specific settings

Specified by:
display in interface TreebankLangParserParams
Specified by:
display in class AbstractTreebankParserParams

setOptionFlag

public int setOptionFlag(java.lang.String[] args,
                         int i)
Some options for setOptionFlag:

-retainNPTmp Retain temporal NP marking on NPs. -retainNPSbj Retain NP subject function tags -markGappedVP marked gapped VPs. -collinizerRetainsPunctuation does what it says.

Specified by:
setOptionFlag in interface TreebankLangParserParams
Overrides:
setOptionFlag in class AbstractTreebankParserParams
Parameters:
args - flag arguments (usually from commmand line
i - index at which to begin argument processing
Returns:
Index in args array after the last processed index for option

main

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


Stanford NLP Group