public class ATBTreeUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
morphBoundary |
static String |
puncTag |
static Set<String> |
reservedWords |
static String |
segMarker |
Modifier and Type | Method and Description |
---|---|
static String |
escape(String s)
Escapes tokens from flat strings that are reserved for usage in the ATB.
|
static String |
flattenTree(Tree t)
Returns the string associated with the input parse tree.
|
static void |
main(String[] args) |
static String |
taggedStringFromTree(Tree t,
boolean removeEscaping,
String separator)
Converts a parse tree into a string of tokens.
|
static String |
unEscape(String s)
Reverts escaping from a flat string.
|
public static String segMarker
public static final String morphBoundary
public static final String puncTag
public static String escape(String s)
s
- - An Arabic stringpublic static String unEscape(String s)
s
- - An Arabic stringpublic static String flattenTree(Tree t)
t
- - A parse treepublic static String taggedStringFromTree(Tree t, boolean removeEscaping, String separator)
separator
t
- - A parse treeremoveEscaping
- - If true, remove LDC escape characters. Otherwise, leave them.separator
- Word/tag separatorpublic static void main(String[] args)