|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.mit.jmwe.detect.StopWords
public class StopWords
Uses the exhaustive strategy specified in Exhaustive
to find the MWEs
that consist entirely of stop words in a sentence.
Field Summary | |
---|---|
static List<String> |
defaultIndex
A list of MWEs whose parts consist entirely of stop words. |
Constructor Summary | |
---|---|
StopWords()
Constructs this detector from the default stop word MWE index. |
|
StopWords(IMWEIndex index)
Constructs this detector from the given stop word MWE index. |
Method Summary | ||
---|---|---|
|
detect(List<T> sentence)
Given a list of tokens, the detector searches for the MWEs in the list. |
|
protected static IMWEIndex |
getStopWordIndex()
Creates, opens, and returns a new stop word index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static List<String> defaultIndex
Constructor Detail |
---|
public StopWords()
IOException
- if an IOException occurs when constructing the index.public StopWords(IMWEIndex index)
index
- the index of stop words that backs this detector
NullPointerException
- if the index is null
.Method Detail |
---|
public <T extends IToken> List<IMWE<T>> detect(List<T> sentence)
IMWEDetector
IMWE
objects representing these
multi-word expressions. The method returns an empty list if no MWEs are
found; the method should never return null
.
detect
in interface IMWEDetector
T
- the type of the tokens in the sentencesentence
- a sentence which the detector should search for multi-word
expressions.
IMWE
objects representing the multi-word
expressions found in the sentence. Returns an empty list if no
multi-word expressions are found; never returns null
protected static IMWEIndex getStopWordIndex()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |