public class CompositeErrorDetector extends java.util.AbstractList<IErrorDetector> implements IErrorDetector
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ID
The ID for this error detector, "edu.mit.jmwe.error.composite"
|
| Constructor and Description |
|---|
CompositeErrorDetector(IErrorDetector... detectors)
Constructs a composite error detector from an array of error detectors.
|
CompositeErrorDetector(java.util.List<? extends IErrorDetector> detectors)
Constructs a composite error detector from a list of error detectors.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends IToken,S extends IMarkedSentence<T>> |
detect(ISentenceResult<T,S> result)
Identifies the multi-word expressions in a unit result that fall under
the specific error class this detector identifies.
|
IErrorDetector |
get(int index) |
java.lang.String |
getID()
Returns an ID string that uniquely identifies this object or object type.
|
int |
size() |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final java.lang.String ID
public CompositeErrorDetector(IErrorDetector... detectors)
detectors - the array of error detectors. May not be null.java.lang.NullPointerException - if the list of error detectors is null or
contains nulljava.lang.IllegalArgumentException - if the specified array is emptypublic CompositeErrorDetector(java.util.List<? extends IErrorDetector> detectors)
detectors - the list of error detectors. May not be null.java.lang.NullPointerException - if the list of error detectors is nullpublic java.lang.String getID()
IHasIDnull.public <T extends IToken,S extends IMarkedSentence<T>> IErrorResult<T> detect(ISentenceResult<T,S> result)
IErrorDetectordetect in interface IErrorDetectorT - the type of tokens contained in the unit.S - the type of marked sentence whose results are stored. Is
parameterized by tokens of type T.result - the sentence result obtained by running an IMWEDetector over a
unitpublic IErrorDetector get(int index)
get in interface java.util.List<IErrorDetector>get in class java.util.AbstractList<IErrorDetector>public int size()
size in interface java.util.Collection<IErrorDetector>size in interface java.util.List<IErrorDetector>size in class java.util.AbstractCollection<IErrorDetector>Copyright © 2011 Massachusetts Institute of Technology. All Rights Reserved.