Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.stanford.nlp.trees.international.pennchinese
Class ChineseTreebankLanguagePack

    java.lang.Object
      edu.stanford.nlp.trees.AbstractTreebankLanguagePack
          edu.stanford.nlp.trees.international.pennchinese.ChineseTreebankLanguagePack

All Implemented Interfaces:
  TreebankLanguagePack, Serializable

    public class ChineseTreebankLanguagePack

extends AbstractTreebankLanguagePack

Language pack for the UPenn/Colorado Chinese treebank. The native character set for the Chinese Treebank is GB18030. This file (like the rest of JavaNLP) is in UTF-8.

Author:
  Roger Levy
See Also:
  Serialized Form

Field Summary
`static String` | `ENCODING`

Fields inherited from class edu.stanford.nlp.trees.AbstractTreebankLanguagePack
`DEFAULT_ENCODING, DEFAULT_GF_CHAR, gfCharacter`

Constructor Summary
`ChineseTreebankLanguagePack()`

Method Summary
`static Filter<String>` | `chineseColonAcceptFilter()`
`static Filter<String>` | `chineseCommaAcceptFilter()`
`static Filter<String>` | `chineseDashAcceptFilter()`
`static Filter<String>` | `chineseDouHaoAcceptFilter()`
`static Filter<String>` | `chineseEndSentenceAcceptFilter()`
`static Filter<String>` | `chineseLeftParenthesisAcceptFilter()`
`static Filter<String>` | `chineseLeftQuoteMarkAcceptFilter()`
`static Filter<String>` | `chineseOtherAcceptFilter()`
`static Filter<String>` | `chineseParenthesisAcceptFilter()`
`static Filter<String>` | `chineseQuoteMarkAcceptFilter()`
`static Filter<String>` | `chineseRightParenthesisAcceptFilter()`
`static Filter<String>` | `chineseRightQuoteMarkAcceptFilter()`
`String` | `getEncoding()` Return the input Charset encoding for the Treebank.
`TokenizerFactory<? extends HasWord>` | `getTokenizerFactory()` Return a tokenizer which might be suitable for tokenizing text that will be used with this Treebank/Language pair, without tokenizing carriage returns (i.e., treating them as white space).
`GrammaticalStructureFactory` | `grammaticalStructureFactory()` Return a GrammaticalStructureFactory suitable for this language/treebank.
`GrammaticalStructureFactory` | `grammaticalStructureFactory(Filter<String> puncFilt)` Return a GrammaticalStructureFactory suitable for this language/treebank.
`HeadFinder` | `headFinder()` The HeadFinder to use for your 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` | `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.
`char[]` | `labelAnnotationIntroducingCharacters()` Return an array of characters at which a String should be truncated to give the basic syntactic category of a label.
`String[]` | `punctuationTags()` Returns a String array of punctuation tags for this treebank/language.
`String[]` | `punctuationWords()` Returns a String array of punctuation words for this treebank/language.
`String[]` | `sentenceFinalPunctuationTags()` Returns a String array of sentence final punctuation tags for this treebank/language.
`String[]` | `sentenceFinalPunctuationWords()` Returns a String array of sentence final punctuation words for this treebank/language.
`static void` | `setTokenizerFactory(TokenizerFactory<? extends HasWord> tf)`
`String[]` | `startSymbols()` Returns a String array of treebank start symbols.
`String` | `treebankFileExtension()` Returns the extension of treebank files for this treebank.
`TreeReaderFactory` | `treeReaderFactory()` Returns a TreeReaderFactory suitable for general purpose use with this language/treebank.

Methods inherited from class edu.stanford.nlp.trees.AbstractTreebankLanguagePack
`basicCategory, categoryAndFunction, evalBIgnoredPunctuationTagAcceptFilter, evalBIgnoredPunctuationTagRejectFilter, evalBIgnoredPunctuationTags, getBasicCategoryFunction, getCategoryAndFunctionFunction, getGfCharacter, isLabelAnnotationIntroducingCharacter, isStartSymbol, punctuationTagAcceptFilter, punctuationTagRejectFilter, punctuationWordAcceptFilter, punctuationWordRejectFilter, sentenceFinalPunctuationTagAcceptFilter, setGfCharacter, startSymbol, startSymbolAcceptFilter, stripGF, treeTokenizerFactory`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ENCODING

    public static final String ENCODING

See Also:
  Constant Field Values

Constructor Detail

### ChineseTreebankLanguagePack

    public ChineseTreebankLanguagePack()

Method Detail

### setTokenizerFactory

    public static void setTokenizerFactory(TokenizerFactory<? extends HasWord> tf)

### getTokenizerFactory

    public TokenizerFactory<? extends HasWord> getTokenizerFactory()

  Description copied from class: `AbstractTreebankLanguagePack`
  Return a tokenizer which might be suitable for tokenizing text that will be used with this Treebank/Language pair, without tokenizing carriage returns (i.e., treating them as white space). The implementation in AbstractTreebankLanguagePack returns a factory for `WhitespaceTokenizer`.

  Specified by:
    `getTokenizerFactory` in interface `TreebankLanguagePack`
  Overrides:
    `getTokenizerFactory` in class `AbstractTreebankLanguagePack`
  Returns:
    A tokenizer

### getEncoding

    public String getEncoding()

  Return the input Charset encoding for the Treebank. See documentation for the `Charset` class.

  Specified by:
    `getEncoding` in interface `TreebankLanguagePack`
  Overrides:
    `getEncoding` in class `AbstractTreebankLanguagePack`
  Returns:
    Name of Charset

### isPunctuationTag

    public boolean isPunctuationTag(String str)

  Accepts a String that is a punctuation tag name, and rejects everything else.

  Specified by:
    `isPunctuationTag` in interface `TreebankLanguagePack`
  Overrides:
    `isPunctuationTag` in class `AbstractTreebankLanguagePack`
  Parameters:
    `str` - The string to check
  Returns:
    Whether this is a punctuation tag

### isPunctuationWord

    public boolean isPunctuationWord(String str)

  Accepts a String that is a punctuation word, and rejects everything else. If one can't tell for sure (as for ' in the Penn Treebank), it maks the best guess that it can.

  Specified by:
    `isPunctuationWord` in interface `TreebankLanguagePack`
  Overrides:
    `isPunctuationWord` in class `AbstractTreebankLanguagePack`
  Parameters:
    `str` - The string to check
  Returns:
    Whether this is a punctuation word

### isSentenceFinalPunctuationTag

    public boolean isSentenceFinalPunctuationTag(String str)

  Accepts a String that is a sentence end punctuation tag, and rejects everything else.

  Specified by:
    `isSentenceFinalPunctuationTag` in interface `TreebankLanguagePack`
  Overrides:
    `isSentenceFinalPunctuationTag` in class `AbstractTreebankLanguagePack`
  Parameters:
    `str` - The string to check
  Returns:
    Whether this is a sentence final punctuation tag

### punctuationTags

    public String[] punctuationTags()

  Returns a String array of punctuation tags for this treebank/language.

  Specified by:
    `punctuationTags` in interface `TreebankLanguagePack`
  Specified by:
    `punctuationTags` in class `AbstractTreebankLanguagePack`
  Returns:
    The punctuation tags

### punctuationWords

    public String[] punctuationWords()

  Returns a String array of punctuation words for this treebank/language.

  Specified by:
    `punctuationWords` in interface `TreebankLanguagePack`
  Specified by:
    `punctuationWords` in class `AbstractTreebankLanguagePack`
  Returns:
    The punctuation words

### sentenceFinalPunctuationTags

    public String[] sentenceFinalPunctuationTags()

  Returns a String array of sentence final punctuation tags for this treebank/language.

  Specified by:
    `sentenceFinalPunctuationTags` in interface `TreebankLanguagePack`
  Specified by:
    `sentenceFinalPunctuationTags` in class `AbstractTreebankLanguagePack`
  Returns:
    The sentence final punctuation tags

### sentenceFinalPunctuationWords

    public String[] sentenceFinalPunctuationWords()

  Returns a String array of sentence final punctuation words for this treebank/language.

  Returns:
    The sentence final punctuation tags

### isEvalBIgnoredPunctuationTag

    public boolean isEvalBIgnoredPunctuationTag(String str)

  Accepts a String that is a punctuation tag that should be ignored by EVALB-style evaluation, and rejects everything else. Traditionally, EVALB has ignored a subset of the total set of punctuation tags in the English Penn Treebank (quotes and period, comma, colon, etc., but not brackets)

  Specified by:
    `isEvalBIgnoredPunctuationTag` in interface `TreebankLanguagePack`
  Overrides:
    `isEvalBIgnoredPunctuationTag` in class `AbstractTreebankLanguagePack`
  Parameters:
    `str` - The string to check
  Returns:
    Whether this is a EVALB-ignored punctuation tag

### labelAnnotationIntroducingCharacters

    public char[] labelAnnotationIntroducingCharacters()

  Return an array of characters at which a String should be truncated to give the basic syntactic category of a label. The idea here is that Penn treebank style labels follow a syntactic category with various functional and crossreferencing information introduced by special characters (such as "NP-SBJ=1"). This would be truncated to "NP" by the array containing '-' and "=".

  Specified by:
    `labelAnnotationIntroducingCharacters` in interface `TreebankLanguagePack`
  Overrides:
    `labelAnnotationIntroducingCharacters` in class `AbstractTreebankLanguagePack`
  Returns:
    An array of characters that set off label name suffixes

### startSymbols

    public String[] startSymbols()

  Returns a String array of treebank start symbols.

  Specified by:
    `startSymbols` in interface `TreebankLanguagePack`
  Specified by:
    `startSymbols` in class `AbstractTreebankLanguagePack`
  Returns:
    The start symbols

### chineseCommaAcceptFilter

    public static Filter<String> chineseCommaAcceptFilter()

### chineseEndSentenceAcceptFilter

    public static Filter<String> chineseEndSentenceAcceptFilter()

### chineseDouHaoAcceptFilter

    public static Filter<String> chineseDouHaoAcceptFilter()

### chineseQuoteMarkAcceptFilter

    public static Filter<String> chineseQuoteMarkAcceptFilter()

### chineseParenthesisAcceptFilter

    public static Filter<String> chineseParenthesisAcceptFilter()

### chineseColonAcceptFilter

    public static Filter<String> chineseColonAcceptFilter()

### chineseDashAcceptFilter

    public static Filter<String> chineseDashAcceptFilter()

### chineseOtherAcceptFilter

    public static Filter<String> chineseOtherAcceptFilter()

### chineseLeftParenthesisAcceptFilter

    public static Filter<String> chineseLeftParenthesisAcceptFilter()

### chineseRightParenthesisAcceptFilter

    public static Filter<String> chineseRightParenthesisAcceptFilter()

### chineseLeftQuoteMarkAcceptFilter

    public static Filter<String> chineseLeftQuoteMarkAcceptFilter()

### chineseRightQuoteMarkAcceptFilter

    public static Filter<String> chineseRightQuoteMarkAcceptFilter()

### treebankFileExtension

    public String treebankFileExtension()

  Returns the extension of treebank files for this treebank. This is "fid".

  Returns:
    the extension on files for this treebank

### grammaticalStructureFactory

    public GrammaticalStructureFactory grammaticalStructureFactory()

  Description copied from class: `AbstractTreebankLanguagePack`
  Return a GrammaticalStructureFactory suitable for this language/treebank. (To be overridden in subclasses.)

  Specified by:
    `grammaticalStructureFactory` in interface `TreebankLanguagePack`
  Overrides:
    `grammaticalStructureFactory` in class `AbstractTreebankLanguagePack`
  Returns:
    A GrammaticalStructureFactory suitable for this language/treebank

### grammaticalStructureFactory

    public GrammaticalStructureFactory grammaticalStructureFactory(Filter<String> puncFilt)

  Description copied from class: `AbstractTreebankLanguagePack`
  Return a GrammaticalStructureFactory suitable for this language/treebank. (To be overridden in subclasses.)

  Specified by:
    `grammaticalStructureFactory` in interface `TreebankLanguagePack`
  Overrides:
    `grammaticalStructureFactory` in class `AbstractTreebankLanguagePack`
  Parameters:
    `puncFilt` - A filter which should reject punctuation words (as Strings)
  Returns:
    A GrammaticalStructureFactory suitable for this language/treebank

### treeReaderFactory

    public TreeReaderFactory treeReaderFactory()

  Description copied from class: `AbstractTreebankLanguagePack`
  Returns a TreeReaderFactory suitable for general purpose use with this language/treebank.

  Specified by:
    `treeReaderFactory` in interface `TreebankLanguagePack`
  Overrides:
    `treeReaderFactory` in class `AbstractTreebankLanguagePack`
  Returns:
    A TreeReaderFactory suitable for general purpose use with this language/treebank.

### headFinder

    public HeadFinder headFinder()

  The HeadFinder to use for your treebank.

  Returns:
    A suitable HeadFinder

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Stanford NLP Group