L - The type of the labelsF - The type of the featurespublic class PTBEscapingProcessor<IN extends HasWord,L,F> extends AbstractListProcessor<IN,HasWord,L,F> implements Function<java.util.List<IN>,java.util.List<HasWord>>
| Modifier and Type | Field and Description |
|---|---|
protected char[] |
escapeChars |
protected boolean |
fixQuotes |
protected java.lang.String[] |
replaceEscapes |
protected java.lang.String[] |
replaceSubsts |
protected char[] |
substChars |
| Constructor and Description |
|---|
PTBEscapingProcessor() |
PTBEscapingProcessor(char[] escapeChars,
java.lang.String[] replaceEscapes,
char[] substChars,
java.lang.String[] replaceSubsts,
boolean fixQuotes) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<HasWord> |
apply(java.util.List<IN> hasWordsList)
Escape a List of HasWords.
|
java.lang.String |
escapeString(java.lang.String s) |
static void |
main(java.lang.String[] args)
This will do the escaping on an input file.
|
java.util.List<HasWord> |
process(java.util.List<? extends IN> input)
Take a List (including a Sentence) of input, and return a
List that has been processed in some way.
|
static java.lang.String |
unprocess(java.lang.String s) |
processDocument, processListsprotected char[] substChars
protected java.lang.String[] replaceSubsts
protected char[] escapeChars
protected java.lang.String[] replaceEscapes
protected boolean fixQuotes
public PTBEscapingProcessor()
public PTBEscapingProcessor(char[] escapeChars,
java.lang.String[] replaceEscapes,
char[] substChars,
java.lang.String[] replaceSubsts,
boolean fixQuotes)
public java.util.List<HasWord> apply(java.util.List<IN> hasWordsList)
public static java.lang.String unprocess(java.lang.String s)
public java.util.List<HasWord> process(java.util.List<? extends IN> input)
ListProcessorprocess in interface ListProcessor<IN extends HasWord,HasWord>input - must be a List of objects of type HasWordpublic java.lang.String escapeString(java.lang.String s)
public static void main(java.lang.String[] args)
args - Command line argument: a file or URL