public class NaiveBayesParseFilter extends Object implements HtmlParseFilter
| Modifier and Type | Field and Description |
|---|---|
static String |
DICTFILE_MODELFILTER |
static String |
TRAINFILE_MODELFILTER |
X_POINT_ID| Constructor and Description |
|---|
NaiveBayesParseFilter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
classify(String text) |
boolean |
containsWord(String url,
ArrayList<String> wordlist) |
ParseResult |
filter(Content content,
ParseResult parseResult,
HTMLMetaTags metaTags,
DocumentFragment doc)
Adds metadata or otherwise modifies a parse of HTML content, given the DOM
tree of a page.
|
boolean |
filterParse(String text) |
boolean |
filterUrl(String url) |
Configuration |
getConf() |
void |
setConf(Configuration conf) |
void |
train() |
public static final String TRAINFILE_MODELFILTER
public static final String DICTFILE_MODELFILTER
public boolean filterParse(String text)
public boolean filterUrl(String url)
public boolean classify(String text) throws IOException
IOExceptionpublic void setConf(Configuration conf)
setConf in interface Configurablepublic Configuration getConf()
getConf in interface Configurablepublic ParseResult filter(Content content, ParseResult parseResult, HTMLMetaTags metaTags, DocumentFragment doc)
HtmlParseFilterfilter in interface HtmlParseFilterCopyright © 2021 The Apache Software Foundation