|
static StringBuffer | appendNode (final StringBuffer sb, final Tree tree, final long format) |
|
static StringBuffer | appendLabel (final StringBuffer sb, final Label label, final boolean isLeaf, final long format) |
|
static StringBuffer | appendScore (final StringBuffer sb, final Tree tree) |
|
static StringBuffer | appendIndex (final StringBuffer sb, final Label label) |
|
static StringBuffer | appendAnnotations (final StringBuffer sb, final Label label) |
|
static StringBuffer | appendAnnotationsFull (final StringBuffer sb, final Label label) |
|
static StringBuffer | indent (final StringBuffer sb, final int n) |
|
static StringBuffer | appendTree (final StringBuffer sb, final Tree tree, final int indentLevel, final boolean hasNullParentLabel, final boolean isFirstSibling, final boolean isLeftSiblingPreTerminal, final boolean isTopLevel, final long format) |
|
static StringBuffer | appendTree1 (final StringBuffer sb, final Tree tree, final long format) |
|
Common utilities
- Author
- Stanford Parser authors
-
Bernard Bou [1313o.nosp@m.u@gm.nosp@m.ail.c.nosp@m.om]
◆ TreePrinter()
grammarscope.server.io.print.TreePrinter.TreePrinter |
( |
| ) |
|
|
private |
◆ appendAnnotations()
static StringBuffer grammarscope.server.io.print.TreePrinter.appendAnnotations |
( |
final StringBuffer |
sb, |
|
|
final Label |
label |
|
) |
| |
|
staticprivate |
Append label's annotations to string sb
- Parameters
-
- Returns
- input string sb
◆ appendAnnotationsFull()
static StringBuffer grammarscope.server.io.print.TreePrinter.appendAnnotationsFull |
( |
final StringBuffer |
sb, |
|
|
final Label |
label |
|
) |
| |
|
staticprivate |
Append label's annotations to string sb as per penString format
- Parameters
-
- Returns
- input string sb
◆ appendIndex()
static StringBuffer grammarscope.server.io.print.TreePrinter.appendIndex |
( |
final StringBuffer |
sb, |
|
|
final Label |
label |
|
) |
| |
|
staticprivate |
Append label index (if any ) to string sb as per format
- Parameters
-
- Returns
- input string sb
◆ appendLabel()
static StringBuffer grammarscope.server.io.print.TreePrinter.appendLabel |
( |
final StringBuffer |
sb, |
|
|
final Label |
label, |
|
|
final boolean |
isLeaf, |
|
|
final long |
format |
|
) |
| |
|
staticprivate |
Append label to string sb as per format
- Parameters
-
sb | string sb |
label | label |
isLeaf | whether this is a leaf |
format | format |
- Returns
- input string sb
◆ appendNode()
static StringBuffer grammarscope.server.io.print.TreePrinter.appendNode |
( |
final StringBuffer |
sb, |
|
|
final Tree |
tree, |
|
|
final long |
format |
|
) |
| |
|
staticprivate |
Append label to string sb as per format
- Parameters
-
sb | string sb |
tree | tree |
format | format |
- Returns
- input string sb
◆ appendScore()
static StringBuffer grammarscope.server.io.print.TreePrinter.appendScore |
( |
final StringBuffer |
sb, |
|
|
final Tree |
tree |
|
) |
| |
|
staticprivate |
Append score
- Parameters
-
- Returns
- input string sb
◆ appendTree()
static StringBuffer grammarscope.server.io.print.TreePrinter.appendTree |
( |
final StringBuffer |
sb, |
|
|
final Tree |
tree, |
|
|
final int |
indentLevel, |
|
|
final boolean |
hasNullParentLabel, |
|
|
final boolean |
isFirstSibling, |
|
|
final boolean |
isLeftSiblingPreTerminal, |
|
|
final boolean |
isTopLevel, |
|
|
final long |
format |
|
) |
| |
|
staticprivate |
Append node to StringBuffer, implementing Penn Treebank style layout
- Parameters
-
sb | StringBuffer |
tree | tree |
indentLevel | indent level |
hasNullParentLabel | whether parent label is null |
isFirstSibling | whether tree is first sibling |
isLeftSiblingPreTerminal | whether tree is left sibling preterminal |
isTopLevel | whether tree is top level |
format | format guidelines |
- Returns
- input string sb
◆ appendTree1()
static StringBuffer grammarscope.server.io.print.TreePrinter.appendTree1 |
( |
final StringBuffer |
sb, |
|
|
final Tree |
tree, |
|
|
final long |
format |
|
) |
| |
|
staticprivate |
Append tree to string sb (no line break)
- Parameters
-
sb | string sb |
tree | tree |
format | format guidelines |
- Returns
- input string sb
◆ grammaticalStructureLeavesToString()
static String grammarscope.server.io.print.TreePrinter.grammaticalStructureLeavesToString |
( |
final GrammaticalStructure |
grammaticalStructure, |
|
|
final long |
format |
|
) |
| |
|
static |
String for grammatical structure
- Parameters
-
grammaticalStructure | grammatical structure |
format | format |
- Returns
- grammatical structure string
◆ grammaticalStructureToString()
static String grammarscope.server.io.print.TreePrinter.grammaticalStructureToString |
( |
final GrammaticalStructure |
grammaticalStructure, |
|
|
final long |
format |
|
) |
| |
|
static |
String for grammatical structure
- Parameters
-
grammaticalStructure | grammatical structure |
format | format |
- Returns
- grammatical structure string
◆ indent()
static StringBuffer grammarscope.server.io.print.TreePrinter.indent |
( |
final StringBuffer |
sb, |
|
|
final int |
n |
|
) |
| |
|
staticprivate |
Indent
- Parameters
-
sb | builder string sb |
n | number of indents |
- Returns
- input string sb
◆ treeGraphToString()
static String grammarscope.server.io.print.TreePrinter.treeGraphToString |
( |
final Tree |
tree, |
|
|
final long |
format |
|
) |
| |
|
static |
String for treegraph
- Parameters
-
tree | tree graph |
format | format |
- Returns
- treegraph string
◆ treeToStringAlt()
static String grammarscope.server.io.print.TreePrinter.treeToStringAlt |
( |
final Tree |
tree, |
|
|
final long |
format |
|
) |
| |
|
static |
String for tree (after pennstring())
- Parameters
-
tree | tree |
format | guidelines |
- Returns
- tree string
◆ ALL_ANNOTATIONS
final long grammarscope.server.io.print.TreePrinter.ALL_ANNOTATIONS = 0x00000010 |
|
static |
All annotations bit in composite format
◆ ANNOTATIONS
final long grammarscope.server.io.print.TreePrinter.ANNOTATIONS = 0x00000008 |
|
static |
Annotation bit in composite format
◆ COLLAPSE
final long grammarscope.server.io.print.TreePrinter.COLLAPSE = 0x20000000 |
|
static |
Collapse bit in composite format
◆ FULL
◆ INDEX
final long grammarscope.server.io.print.TreePrinter.INDEX = 0x00000004 |
|
static |
Index bit in composite format
◆ LEAF_TAG1
final char grammarscope.server.io.print.TreePrinter.LEAF_TAG1 = '[' |
|
static |
◆ LEAF_TAG2
final char grammarscope.server.io.print.TreePrinter.LEAF_TAG2 = ']' |
|
static |
◆ SCORE
final long grammarscope.server.io.print.TreePrinter.SCORE = 0x10000000 |
|
static |
Score bit in composite format
◆ SCORE_FORMAT
final NumberFormat grammarscope.server.io.print.TreePrinter.SCORE_FORMAT = new DecimalFormat("0.000") |
|
static |
◆ SCORE_TAG1
final char grammarscope.server.io.print.TreePrinter.SCORE_TAG1 = '|' |
|
static |
◆ SCORE_TAG2
final char grammarscope.server.io.print.TreePrinter.SCORE_TAG2 = '|' |
|
static |
◆ TAG_LEAVES
final long grammarscope.server.io.print.TreePrinter.TAG_LEAVES = 0x40000000 |
|
static |
Tag leaves bit in composite format
◆ VALUE
final long grammarscope.server.io.print.TreePrinter.VALUE = 0x00000002 |
|
static |
Value bit in composite format
◆ WORD
final long grammarscope.server.io.print.TreePrinter.WORD = 0x00000001 |
|
static |
Word bit in composite format
The documentation for this class was generated from the following file: