public class NLPManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.List<java.lang.String> |
EMAILTOKENS |
static java.util.List<java.lang.String> |
NAMESALUTATION |
static java.util.List<java.lang.String> |
NAMETOKENS |
static java.util.List<java.lang.String> |
PLACETOKENS |
static java.util.List<java.lang.String> |
URLTOKENS |
Constructor and Description |
---|
NLPManager()
Default constructor for the NLPManager.
|
Modifier and Type | Method and Description |
---|---|
int |
findContext(java.lang.String sentence) |
void |
initializingGate()
Initializes the required libraries for the component to work.
|
ProcessedText |
processText(java.lang.String rawText,
java.lang.String sourceName,
java.lang.String url)
This method would take in raw HTML string and the sourceName as input and returns processedText back.
|
public static final java.util.List<java.lang.String> EMAILTOKENS
public static final java.util.List<java.lang.String> URLTOKENS
public static final java.util.List<java.lang.String> NAMESALUTATION
public static final java.util.List<java.lang.String> PLACETOKENS
public static final java.util.List<java.lang.String> NAMETOKENS
public NLPManager()
public void initializingGate() throws gate.util.GateException, java.net.MalformedURLException
This method may throw GateException if the gate library failed to be located or initialized.
gate.util.GateException
java.net.MalformedURLException
public ProcessedText processText(java.lang.String rawText, java.lang.String sourceName, java.lang.String url) throws gate.util.GateException
rawText
- a string of HTML content to be used for extractionsourceName
- the name of the source document used for extraction.gate.util.GateException
public int findContext(java.lang.String sentence)