java.lang.Object
edu.stanford.nlp.util.Pair<E,E>
edu.stanford.nlp.util.Interval<E>
edu.stanford.nlp.util.FuzzyInterval<E>
- Type Parameters:
E - The type of the endpoint used in the FuzzyInterval.
- All Implemented Interfaces:
- HasInterval<E>, PrettyLoggable, java.io.Serializable, java.lang.Comparable<Pair<E,E>>
public class FuzzyInterval<E extends FuzzyInterval.FuzzyComparable<E>>
- extends Interval<E>
A FuzzyInterval is an extension of Interval where not all endpoints are always
specified or comparable. It is assumed that most endpoints will be comparable
so that there is some meaningful relationship between most FuzzyIntervals
- See Also:
- Serialized Form
| Fields inherited from class edu.stanford.nlp.util.Interval |
INTERVAL_OPEN_BEGIN, INTERVAL_OPEN_END, REL_FLAGS_AFTER, REL_FLAGS_BEFORE, REL_FLAGS_EE_AFTER, REL_FLAGS_EE_BEFORE, REL_FLAGS_EE_SAME, REL_FLAGS_EE_SHIFT, REL_FLAGS_EE_UNKNOWN, REL_FLAGS_ES_AFTER, REL_FLAGS_ES_BEFORE, REL_FLAGS_ES_SAME, REL_FLAGS_ES_SHIFT, REL_FLAGS_ES_UNKNOWN, REL_FLAGS_INTERVAL_AFTER, REL_FLAGS_INTERVAL_ALMOST_AFTER, REL_FLAGS_INTERVAL_ALMOST_BEFORE, REL_FLAGS_INTERVAL_ALMOST_SAME, REL_FLAGS_INTERVAL_BEFORE, REL_FLAGS_INTERVAL_CONTAIN, REL_FLAGS_INTERVAL_FUZZY, REL_FLAGS_INTERVAL_INSIDE, REL_FLAGS_INTERVAL_OVERLAP, REL_FLAGS_INTERVAL_SAME, REL_FLAGS_INTERVAL_UNKNOWN, REL_FLAGS_SAME, REL_FLAGS_SE_AFTER, REL_FLAGS_SE_BEFORE, REL_FLAGS_SE_SAME, REL_FLAGS_SE_SHIFT, REL_FLAGS_SE_UNKNOWN, REL_FLAGS_SS_AFTER, REL_FLAGS_SS_BEFORE, REL_FLAGS_SS_SAME, REL_FLAGS_SS_SHIFT, REL_FLAGS_SS_UNKNOWN, REL_FLAGS_UNKNOWN |
| Methods inherited from class edu.stanford.nlp.util.Interval |
addIntervalRelationFlags, checkFlagExclusiveSet, checkFlagSet, checkMultipleBitSet, compareIntervalOrder, contains, contains, containsOpen, equals, expand, extractRelationSubflags, getBegin, getEnd, getInterval, getMidPoint, getRadius, hashCode, includesBegin, includesEnd, intersect, isIntervalComparable, max, min, overlaps, toRelFlags |
| Methods inherited from class edu.stanford.nlp.util.Pair |
asList, compareTo, first, internedStringPair, makePair, prettyLog, readStringPair, save, second, setFirst, setSecond, stringIntern, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
toInterval
public static <E extends FuzzyInterval.FuzzyComparable<E>> FuzzyInterval<E> toInterval(E a,
E b)
toInterval
public static <E extends FuzzyInterval.FuzzyComparable<E>> FuzzyInterval<E> toInterval(E a,
E b,
int flags)
toValidInterval
public static <E extends FuzzyInterval.FuzzyComparable<E>> FuzzyInterval<E> toValidInterval(E a,
E b)
toValidInterval
public static <E extends FuzzyInterval.FuzzyComparable<E>> FuzzyInterval<E> toValidInterval(E a,
E b,
int flags)
getRelationFlags
public int getRelationFlags(Interval<E> other)
- Description copied from class:
Interval
- Return set of flags indicating possible relationships between
this interval and another interval.
- Overrides:
getRelationFlags in class Interval<E extends FuzzyInterval.FuzzyComparable<E>>
- Parameters:
other - Interval with which to compare with
- Returns:
- flags indicating possible relationship between this interval and the other interval
getRelation
public Interval.RelType getRelation(Interval<E> other)
- Description copied from class:
Interval
- Returns the relationship of this interval to the other interval
The most specific relationship from the following is returned.
NONE: the other interval is null
EQUAL: this have same endpoints as other
OVERLAP: this and other overlaps
BEFORE: this ends before other starts
AFTER: this starts after other ends
BEGIN_MEET_END: this begin is the same as the others end
END_MEET_BEGIN: this end is the same as the others begin
CONTAIN: this contains the other
INSIDE: this is inside the other
UNKNOWN: this is returned if for some reason it is not
possible to determine the exact relationship
of the two intervals (possible for fuzzy intervals)
- Overrides:
getRelation in class Interval<E extends FuzzyInterval.FuzzyComparable<E>>
- Parameters:
other - The other interval with which to compare with
- Returns:
- RelType indicating relationship between the two interval
Stanford NLP Group