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