public class StopWords extends java.lang.Object implements IMWEDetector
Exhaustive to find the MWEs
that consist entirely of stop words in a sentence.| Modifier and Type | Field and Description |
|---|---|
static java.util.List<java.lang.String> |
defaultIndex
A list of MWEs whose parts consist entirely of stop words.
|
| Constructor and Description |
|---|
StopWords()
Constructs this detector from the default stop word MWE index.
|
StopWords(IMWEIndex index)
Constructs this detector from the given stop word MWE index.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends IToken> |
detect(java.util.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.
|
public static java.util.List<java.lang.String> defaultIndex
public StopWords()
public StopWords(IMWEIndex index)
index - the index of stop words that backs this detectorjava.lang.NullPointerException - if the index is null.public <T extends IToken> java.util.List<IMWE<T>> detect(java.util.List<T> sentence)
IMWEDetectorIMWE 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 IMWEDetectorT - 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 nullprotected static IMWEIndex getStopWordIndex()
Copyright © 2011 Massachusetts Institute of Technology. All Rights Reserved.