|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.mit.jmwe.index.HasMWEIndex
edu.mit.jmwe.detect.Consecutive
public class Consecutive
Detector that uses an index to detect the MWEs whose parts appear continuously in the sentence.
Constructor Summary | |
---|---|
Consecutive(IMWEIndex index)
Constructs the detector from the given index. |
Method Summary | ||
---|---|---|
|
detect(List<T> sent)
Given a list of tokens, the detector searches for the MWEs in the list. |
|
protected
|
fillNextSlot(MWEBuilder<T> builder,
T t)
Fills the first non-null (empty) slot in the given builder. |
|
protected Set<? extends IMWEDesc> |
getMWEDescs(IToken token)
Returns all the MWE entries in the index that contain the given token or one of its stems as a part. |
Methods inherited from class edu.mit.jmwe.index.HasMWEIndex |
---|
getMWEIndex |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Consecutive(IMWEIndex index)
index
- the index to be used when searching for MWEs. May not be
null
.Method Detail |
---|
public <T extends IToken> List<IMWE<T>> detect(List<T> sent)
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 sentencesent
- 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 <T extends IToken> boolean fillNextSlot(MWEBuilder<T> builder, T t)
builder
- the builder to be filledt
- the token to fill the builder's next open slot with
protected Set<? extends IMWEDesc> getMWEDescs(IToken token)
token
- the token to be looked up in the index
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |