|
| String | print (final T tree, final long format) |
| |
|
| StringBuffer | appendTree (final StringBuffer sb, final T tree, final int indentLevel, final boolean parentLabelNull, final boolean firstSibling, final boolean leftSiblingPreTerminal, final boolean topLevel, final long format) |
| |
| StringBuffer | appendTree1 (final StringBuffer sb, final T t, final long format) |
| |
| boolean | isPreTerminal (final T t) |
| |
|
| static StringBuffer | appendIndex (final StringBuffer sb, final ILabel l) |
| |
| static StringBuffer | indent (final StringBuffer sb, final int n) |
| |
Common utilities
- Author
- Stanford
-
Bernard Bou [1313o.nosp@m.u@gm.nosp@m.ail.c.nosp@m.om]
◆ appendAnnotations()
Append annotations to string buffer
- Parameters
-
- Returns
- input string sb
◆ appendAnnotationsFull()
Append all annotations to string buffer
- Parameters
-
- Returns
- input string sb
◆ appendIndex()
Append index to string buffer
- Parameters
-
- Returns
- input string sb
◆ appendLabel()
Append label to string buffer as per format
- Parameters
-
| sb | string buffer |
| l | label |
| isLeaf | whether it is leaf |
| format | format |
- Returns
- input string sb
◆ appendNode()
Append label to string buffer as per format
- Parameters
-
| sb | string buffer |
| tree | tree |
| format | format |
- Returns
- input string sb
◆ appendScore()
Append score to string buffer
- Parameters
-
- Returns
- input string sb
◆ appendTree()
| StringBuffer grammarscope.io.print.TreePrinter< T extends ITreeNode< T >.appendTree |
( |
final StringBuffer |
sb, |
|
|
final T |
tree, |
|
|
final int |
indentLevel, |
|
|
final boolean |
parentLabelNull, |
|
|
final boolean |
firstSibling, |
|
|
final boolean |
leftSiblingPreTerminal, |
|
|
final boolean |
topLevel, |
|
|
final long |
format |
|
) |
| |
|
private |
Append node to string buffer, implementing Penn Treebank style layout
- Parameters
-
| sb | string buffer |
| tree | tree |
| indentLevel | indent level |
| parentLabelNull | whether parent label is null |
| firstSibling | whether tree is first sibling |
| leftSiblingPreTerminal | whether tree is left sibling preterminal |
| topLevel | whether tree is top level |
| format | format guidelines |
- Returns
- sb author Stanford Parser authors author Bernard Bou for revision
◆ appendTree1()
Append tree to string buffer (no line break)
- Parameters
-
| sb | string buffer |
| t | tree |
| format | format guidelines |
- Returns
- sb
◆ indent()
Indent
- Parameters
-
| sb | string buffer |
| n | number of indents |
- Returns
- sb
◆ isLeaf()
Is leaf
- Parameters
-
- Returns
- true if tree is leaf
◆ isPreTerminal()
Is preterminal
- Parameters
-
- Returns
- true if tree is preterminal
◆ print()
String for treegraph
- Parameters
-
| tree | treegraph |
| format | format |
- Returns
- treegraph string
◆ ALL_ANNOTATIONS
◆ ANNOTATIONS
◆ COLLAPSE
◆ FULL
◆ INDEX
◆ LEAF_TAG1
◆ LEAF_TAG2
◆ NODE_TAG1
◆ NODE_TAG2
◆ SCORE
◆ SCORE_FORMAT
◆ SCORE_TAG1
◆ SCORE_TAG2
◆ TAG_LEAVES
◆ TAG_NODES
◆ VALUE
◆ WORD
The documentation for this class was generated from the following file: