public class PennTreeUtils extends Object
Constructor and Description |
---|
PennTreeUtils() |
Modifier and Type | Method and Description |
---|---|
static PennTreeNode |
convertPennTree(Constituent aConstituent) |
static String |
escapeToken(String aToken) |
static List<PennTreeNode> |
getPreTerminals(PennTreeNode aNode) |
static boolean |
isEmpty(int aBegin,
int aEnd) |
static PennTreeNode |
parsePennTree(String aTree) |
static PennTreeNode |
selectDfs(PennTreeNode aNode,
int aIndex) |
static String |
toPennTree(PennTreeNode aNode) |
static String |
toPrettyPennTree(PennTreeNode aNode) |
static String |
toText(PennTreeNode aNode) |
static void |
trim(CharSequence aText,
int[] aSpan)
Remove trailing or leading whitespace from the annotation.
|
static boolean |
trimChar(char aChar) |
static String |
unescapeToken(String aToken) |
public static PennTreeNode convertPennTree(Constituent aConstituent)
public static String toText(PennTreeNode aNode)
public static PennTreeNode selectDfs(PennTreeNode aNode, int aIndex)
public static PennTreeNode parsePennTree(String aTree)
public static String toPennTree(PennTreeNode aNode)
public static String toPrettyPennTree(PennTreeNode aNode)
public static void trim(CharSequence aText, int[] aSpan)
aText
- the text.aSpan
- the offsets (will be updated in the process).public static boolean isEmpty(int aBegin, int aEnd)
public static boolean trimChar(char aChar)
public static List<PennTreeNode> getPreTerminals(PennTreeNode aNode)
Copyright © 2007–2018 Ubiquitous Knowledge Processing (UKP) Lab, Technische Universität Darmstadt. All rights reserved.