nltk.tree.parsing module¶
- nltk.tree.parsing.bracket_parse(s)[source]¶
Use Tree.read(s, remove_empty_top_bracketing=True) instead.
- nltk.tree.parsing.sinica_parse(s)[source]¶
Parse a Sinica Treebank string and return a tree. Trees are represented as nested brackettings, as shown in the following example (X represents a Chinese character): S(goal:NP(Head:Nep:XX)|theme:NP(Head:Nhaa:X)|quantity:Dab:X|Head:VL2:X)#0(PERIODCATEGORY)
- Returns
A tree corresponding to the string representation.
- Return type
- Parameters
s (str) – The string to be converted