|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.trees.AbstractTreebankLanguagePack
This provides an implementation of parts of the TreebankLanguagePack API to reduce the load on fresh implementations. Only the abstract methods below need to be implemented to give a reasonable solution for a new language.
Field Summary | |
static String |
DEFAULT_ENCODING
Use this as the default encoding for Readers and Writers of Treebank data. |
Constructor Summary | |
AbstractTreebankLanguagePack()
Gives a handle to the TreebankLanguagePack |
Method Summary | |
String |
basicCategory(String category)
Returns the basic syntactic category of a String by truncating stuff after a (non-word-initial) occurrence of one of the labelAnnotationIntroducingCharacters() . |
Filter |
evalBIgnoredPunctuationTagAcceptFilter()
Returns a filter that accepts a String that is a punctuation tag that should be ignored by EVALB-style evaluation, and rejects everything else. |
String[] |
evalBIgnoredPunctuationTags()
Returns a String array of punctuation tags that EVALB-style evaluation should ignore for this treebank/language. |
String |
getEncoding()
Return the input Charset encoding for the Treebank. |
boolean |
isEvalBIgnoredPunctuationTag(String str)
Accepts a String that is a punctuation tag that should be ignored by EVALB-style evaluation, and rejects everything else. |
boolean |
isLabelAnnotationIntroducingCharacter(char ch)
Say whether this character is an annotation introducing character. |
boolean |
isPunctuationTag(String str)
Accepts a String that is a punctuation tag name, and rejects everything else. |
boolean |
isPunctuationWord(String str)
Accepts a String that is a punctuation word, and rejects everything else. |
boolean |
isSentenceFinalPunctuationTag(String str)
Accepts a String that is a sentence end punctuation tag, and rejects everything else. |
boolean |
isStartSymbol(String str)
Accepts a String that is a start symbol of the treebank. |
char[] |
labelAnnotationIntroducingCharacters()
Return an array of characters at which a String should be truncated to give the basic syntactic category of a label. |
Filter |
punctuationTagAcceptFilter()
Return a filter that accepts a String that is a punctuation tag name, and rejects everything else. |
abstract String[] |
punctuationTags()
Returns a String array of punctuation tags for this treebank/language. |
Filter |
punctuationWordAcceptFilter()
Returns a filter that accepts a String that is a punctuation word, and rejects everything else. |
abstract String[] |
punctuationWords()
Returns a String array of punctuation words for this treebank/language. |
Filter |
sentenceFinalPunctuationTagAcceptFilter()
Returns a filter that accepts a String that is a sentence end punctuation tag, and rejects everything else. |
abstract String[] |
sentenceFinalPunctuationTags()
Returns a String array of sentence final punctuation tags for this treebank/language. |
String |
startSymbol()
Returns a String which is the first (perhaps unique) start symbol of the treebank, or null if none is defined. |
Filter |
startSymbolAcceptFilter()
Return a filter that accepts a String that is a start symbol of the treebank, and rejects everything else. |
abstract String[] |
startSymbols()
Returns a String array of treebank start symbols. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.stanford.nlp.trees.TreebankLanguagePack |
getTokenizerFactory, sentenceFinalPunctuationWords |
Field Detail |
public static final String DEFAULT_ENCODING
Constructor Detail |
public AbstractTreebankLanguagePack()
Method Detail |
public abstract String[] punctuationTags()
punctuationTags
in interface TreebankLanguagePack
public abstract String[] punctuationWords()
punctuationWords
in interface TreebankLanguagePack
public abstract String[] sentenceFinalPunctuationTags()
sentenceFinalPunctuationTags
in interface TreebankLanguagePack
public String[] evalBIgnoredPunctuationTags()
evalBIgnoredPunctuationTags
in interface TreebankLanguagePack
public boolean isPunctuationTag(String str)
isPunctuationTag
in interface TreebankLanguagePack
public boolean isPunctuationWord(String str)
isPunctuationWord
in interface TreebankLanguagePack
public boolean isSentenceFinalPunctuationTag(String str)
isSentenceFinalPunctuationTag
in interface TreebankLanguagePack
public boolean isEvalBIgnoredPunctuationTag(String str)
isEvalBIgnoredPunctuationTag
in interface TreebankLanguagePack
public Filter punctuationTagAcceptFilter()
punctuationTagAcceptFilter
in interface TreebankLanguagePack
public Filter punctuationWordAcceptFilter()
punctuationWordAcceptFilter
in interface TreebankLanguagePack
public Filter sentenceFinalPunctuationTagAcceptFilter()
sentenceFinalPunctuationTagAcceptFilter
in interface TreebankLanguagePack
public Filter evalBIgnoredPunctuationTagAcceptFilter()
evalBIgnoredPunctuationTagAcceptFilter
in interface TreebankLanguagePack
public String getEncoding()
Charset
class.
getEncoding
in interface TreebankLanguagePack
public char[] labelAnnotationIntroducingCharacters()
labelAnnotationIntroducingCharacters
in interface TreebankLanguagePack
public String basicCategory(String category)
labelAnnotationIntroducingCharacters()
.
basicCategory
in interface TreebankLanguagePack
category
- The whole String name of the label
public boolean isLabelAnnotationIntroducingCharacter(char ch)
isLabelAnnotationIntroducingCharacter
in interface TreebankLanguagePack
ch
- The character to check
public boolean isStartSymbol(String str)
isStartSymbol
in interface TreebankLanguagePack
public Filter startSymbolAcceptFilter()
startSymbolAcceptFilter
in interface TreebankLanguagePack
public abstract String[] startSymbols()
startSymbols
in interface TreebankLanguagePack
public String startSymbol()
startSymbol
in interface TreebankLanguagePack
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |