Parser.TextProcessor<SpamTextProcessor.TermCount>
, FlyweightPrototype<Parser.TextProcessor<SpamTextProcessor.TermCount>>
, java.lang.Appendable
public final class SpamTextProcessor extends java.lang.Object implements Parser.TextProcessor<SpamTextProcessor.TermCount>
Parser.TextProcessor
that accumulates the counts of terms from a given set specified via a
StringMap
.Modifier and Type | Class | Description |
---|---|---|
static class |
SpamTextProcessor.TermCount |
Constructor | Description |
---|---|
SpamTextProcessor(Object2LongFunction<MutableString> termSetOnthology) |
|
SpamTextProcessor(java.lang.String termSetOnthologyURI) |
Modifier and Type | Method | Description |
---|---|---|
java.lang.Appendable |
append(char c) |
|
java.lang.Appendable |
append(java.lang.CharSequence csq) |
|
java.lang.Appendable |
append(java.lang.CharSequence csq,
int start,
int end) |
|
Parser.TextProcessor<SpamTextProcessor.TermCount> |
copy() |
|
void |
init(java.net.URI responseUrl) |
Initializes this processor for a new page.
|
SpamTextProcessor.TermCount |
result() |
Returns the result of the processing.
|
public SpamTextProcessor(Object2LongFunction<MutableString> termSetOnthology)
public SpamTextProcessor(java.lang.String termSetOnthologyURI) throws java.lang.ClassNotFoundException, java.net.MalformedURLException, java.io.IOException
java.lang.ClassNotFoundException
java.net.MalformedURLException
java.io.IOException
public java.lang.Appendable append(java.lang.CharSequence csq) throws java.io.IOException
append
in interface java.lang.Appendable
java.io.IOException
public java.lang.Appendable append(java.lang.CharSequence csq, int start, int end) throws java.io.IOException
append
in interface java.lang.Appendable
java.io.IOException
public java.lang.Appendable append(char c) throws java.io.IOException
append
in interface java.lang.Appendable
java.io.IOException
public void init(java.net.URI responseUrl)
Parser.TextProcessor
init
in interface Parser.TextProcessor<SpamTextProcessor.TermCount>
responseUrl
- the URL of the page to be parsed.public SpamTextProcessor.TermCount result()
Parser.TextProcessor
result
in interface Parser.TextProcessor<SpamTextProcessor.TermCount>
public Parser.TextProcessor<SpamTextProcessor.TermCount> copy()
copy
in interface FlyweightPrototype<Parser.TextProcessor<SpamTextProcessor.TermCount>>