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 java.util.function.Function<java.util.List<IN>,java.util.List<HasWord>>
| Constructor and Description |
|---|
PTBEscapingProcessor() |
PTBEscapingProcessor(boolean fixQuotes) |
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, processListspublic PTBEscapingProcessor()
public PTBEscapingProcessor(boolean fixQuotes)
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