public class CommentFilter extends Object implements StreamFilter
| Modifier and Type | Field and Description |
|---|---|
protected List<net.java.sen.filter.stream.CommentFilter.Rule> |
ruleList
The list of rules defining the start and end of comments, and the
part-of-speech code to be used in the
Tokens
used to replace them |
| Constructor and Description |
|---|
CommentFilter() |
| Modifier and Type | Method and Description |
|---|---|
List<Token> |
postProcess(List<Token> tokens)
Post-processes analysed tokens
|
void |
preProcess(Sentence sentence)
Pre-processes a sentence
|
void |
readRules(BufferedReader reader)
Reads the rules to apply as space-delimited text
|
protected List<net.java.sen.filter.stream.CommentFilter.Rule> ruleList
Tokens
used to replace thempublic void readRules(BufferedReader reader) throws IOException
reader - The reader from which to read the rulesIOExceptionpublic void preProcess(Sentence sentence)
StreamFilterpreProcess in interface StreamFiltersentence - The sentence be pre-processedpublic List<Token> postProcess(List<Token> tokens)
StreamFilterpostProcess in interface StreamFiltertokens - The analysed tokens