public class PennTreebankLanguagePack extends AbstractTreebankLanguagePack
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
pennPunctTags |
DEFAULT_ENCODING, DEFAULT_GF_CHAR, generateOriginalDependencies, gfCharacter
Constructor and Description |
---|
PennTreebankLanguagePack()
Gives a handle to the TreebankLanguagePack
|
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
evalBIgnoredPunctuationTags()
Returns a String array of punctuation tags that EVALB-style evaluation
should ignore for this treebank/language.
|
TokenizerFactory<CoreLabel> |
getTokenizerFactory()
Returns a factory for
PTBTokenizer . |
GrammaticalStructureFactory |
grammaticalStructureFactory()
Return a GrammaticalStructure suitable for this language/treebank.
|
GrammaticalStructureFactory |
grammaticalStructureFactory(java.util.function.Predicate<java.lang.String> puncFilter)
Return a GrammaticalStructure suitable for this language/treebank.
|
GrammaticalStructureFactory |
grammaticalStructureFactory(java.util.function.Predicate<java.lang.String> puncFilter,
HeadFinder hf)
Return a GrammaticalStructureFactory suitable for this language/treebank.
|
HeadFinder |
headFinder()
The HeadFinder to use for your treebank.
|
char[] |
labelAnnotationIntroducingCharacters()
Return an array of characters at which a String should be
truncated to give the basic syntactic category of a label.
|
static void |
main(java.lang.String[] args)
Prints a few aspects of the TreebankLanguagePack, just for debugging.
|
java.lang.String[] |
punctuationTags()
Returns a String array of punctuation tags for this treebank/language.
|
java.lang.String[] |
punctuationWords()
Returns a String array of punctuation words for this treebank/language.
|
java.lang.String[] |
sentenceFinalPunctuationTags()
Returns a String array of sentence final punctuation tags for this
treebank/language.
|
java.lang.String[] |
sentenceFinalPunctuationWords()
Returns a String array of sentence final punctuation words for this
treebank/language.
|
java.lang.String[] |
startSymbols()
Returns a String array of treebank start symbols.
|
boolean |
supportsGrammaticalStructures()
Whether or not we have typed dependencies for this language.
|
java.lang.String |
treebankFileExtension()
Returns the extension of treebank files for this treebank.
|
HeadFinder |
typedDependencyHeadFinder()
The HeadFinder to use when making typed dependencies.
|
basicCategory, categoryAndFunction, evalBIgnoredPunctuationTagAcceptFilter, evalBIgnoredPunctuationTagRejectFilter, generateOriginalDependencies, getBasicCategoryFunction, getCategoryAndFunctionFunction, getEncoding, getGfCharacter, isEvalBIgnoredPunctuationTag, isLabelAnnotationIntroducingCharacter, isPunctuationTag, isPunctuationWord, isSentenceFinalPunctuationTag, isStartSymbol, morphFeatureSpec, punctuationTagAcceptFilter, punctuationTagRejectFilter, punctuationWordAcceptFilter, punctuationWordRejectFilter, sentenceFinalPunctuationTagAcceptFilter, setGenerateOriginalDependencies, setGfCharacter, startSymbol, startSymbolAcceptFilter, stripGF, treeReaderFactory, treeTokenizerFactory
public PennTreebankLanguagePack()
public java.lang.String[] punctuationTags()
punctuationTags
in interface TreebankLanguagePack
punctuationTags
in class AbstractTreebankLanguagePack
public java.lang.String[] punctuationWords()
punctuationWords
in interface TreebankLanguagePack
punctuationWords
in class AbstractTreebankLanguagePack
public java.lang.String[] sentenceFinalPunctuationTags()
sentenceFinalPunctuationTags
in interface TreebankLanguagePack
sentenceFinalPunctuationTags
in class AbstractTreebankLanguagePack
public java.lang.String[] sentenceFinalPunctuationWords()
sentenceFinalPunctuationWords
in interface TreebankLanguagePack
sentenceFinalPunctuationWords
in class AbstractTreebankLanguagePack
public java.lang.String[] evalBIgnoredPunctuationTags()
evalBIgnoredPunctuationTags
in interface TreebankLanguagePack
evalBIgnoredPunctuationTags
in class AbstractTreebankLanguagePack
public char[] labelAnnotationIntroducingCharacters()
labelAnnotationIntroducingCharacters
in interface TreebankLanguagePack
labelAnnotationIntroducingCharacters
in class AbstractTreebankLanguagePack
public java.lang.String[] startSymbols()
startSymbols
in interface TreebankLanguagePack
startSymbols
in class AbstractTreebankLanguagePack
public TokenizerFactory<CoreLabel> getTokenizerFactory()
PTBTokenizer
.getTokenizerFactory
in interface TreebankLanguagePack
getTokenizerFactory
in class AbstractTreebankLanguagePack
public java.lang.String treebankFileExtension()
treebankFileExtension
in interface TreebankLanguagePack
treebankFileExtension
in class AbstractTreebankLanguagePack
public GrammaticalStructureFactory grammaticalStructureFactory()
grammaticalStructureFactory
in interface TreebankLanguagePack
grammaticalStructureFactory
in class AbstractTreebankLanguagePack
public GrammaticalStructureFactory grammaticalStructureFactory(java.util.function.Predicate<java.lang.String> puncFilter)
Note: This is loaded by reflection so basic treebank use does not require all the Stanford Dependencies code. TODO: ?????
grammaticalStructureFactory
in interface TreebankLanguagePack
grammaticalStructureFactory
in class AbstractTreebankLanguagePack
puncFilter
- A filter which should reject punctuation words (as Strings)public GrammaticalStructureFactory grammaticalStructureFactory(java.util.function.Predicate<java.lang.String> puncFilter, HeadFinder hf)
AbstractTreebankLanguagePack
grammaticalStructureFactory
in interface TreebankLanguagePack
grammaticalStructureFactory
in class AbstractTreebankLanguagePack
puncFilter
- A filter which should reject punctuation words (as Strings)hf
- A HeadFinder which finds heads for typed dependenciespublic boolean supportsGrammaticalStructures()
TreebankLanguagePack
supportsGrammaticalStructures
in interface TreebankLanguagePack
supportsGrammaticalStructures
in class AbstractTreebankLanguagePack
public HeadFinder headFinder()
headFinder
in interface TreebankLanguagePack
headFinder
in class AbstractTreebankLanguagePack
public HeadFinder typedDependencyHeadFinder()
typedDependencyHeadFinder
in interface TreebankLanguagePack
typedDependencyHeadFinder
in class AbstractTreebankLanguagePack
public static void main(java.lang.String[] args)