public abstract class ExtractorBase extends java.lang.Object implements BoilerpipeExtractor
| Constructor and Description |
|---|
ExtractorBase() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getText(org.xml.sax.InputSource is)
Extracts text from the HTML code available from the given
InputSource. |
java.lang.String |
getText(java.io.Reader r)
Extracts text from the HTML code available from the given
Reader. |
java.lang.String |
getText(java.lang.String html)
Extracts text from the HTML code given as a String.
|
java.lang.String |
getText(TextDocument doc)
Extracts text from the given
TextDocument object. |
java.lang.String |
getText(java.net.URL url)
Extracts text from the HTML code available from the given
URL. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprocesspublic java.lang.String getText(java.lang.String html)
throws BoilerpipeProcessingException
getText in interface BoilerpipeExtractorhtml - The HTML code as a String.BoilerpipeProcessingExceptionpublic java.lang.String getText(org.xml.sax.InputSource is)
throws BoilerpipeProcessingException
InputSource.getText in interface BoilerpipeExtractoris - The InputSource containing the HTMLBoilerpipeProcessingExceptionpublic java.lang.String getText(java.net.URL url)
throws BoilerpipeProcessingException
URL.
NOTE: This method is mainly to be used for show case purposes. If you are
going to crawl the Web, consider using getText(InputSource)
instead.url - The URL pointing to the HTML code.BoilerpipeProcessingExceptionpublic java.lang.String getText(java.io.Reader r)
throws BoilerpipeProcessingException
Reader.getText in interface BoilerpipeExtractorr - The Reader containing the HTMLBoilerpipeProcessingExceptionpublic java.lang.String getText(TextDocument doc) throws BoilerpipeProcessingException
TextDocument object.getText in interface BoilerpipeExtractordoc - The TextDocument.BoilerpipeProcessingException