public class Polarity extends Object
A class intended to be attached to a lexical item, determining what mutations are valid on it while maintaining valid Natural Logic inference.
| Modifier | Constructor and Description |
|---|---|
|
Polarity(byte[] projectionFunction)
Create a polarity item by directly copying the projection function from
NaturalLogicRelations to
their projected relation. |
protected |
Polarity(List<Pair<Monotonicity,MonotonicityType>> operatorsInNarrowingScopeOrder)
Create a polarity from a list of operators in scope
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
introducesNegation(NaturalLogicRelation lexicalRelation)
If true, applying this lexical relation to this word creates a sentence which is negated by the original sentence
Note that both this, and
maintainsEntailment(NaturalLogicRelation)} can be false. |
boolean |
isDownwards()
Ignoring exclusion, determine if this word has downward polarity.
|
boolean |
isUpwards()
Ignoring exclusion, determine if this word has upward polarity.
|
boolean |
maintainsEntailment(NaturalLogicRelation lexicalRelation)
If true, applying this lexical relation to this word creates a sentence which is entailed by the original sentence,
Note that both this, and
introducesNegation(NaturalLogicRelation) can be false. |
NaturalLogicRelation |
projectLexicalRelation(NaturalLogicRelation lexicalRelation)
Project the given natural logic lexical relation on this word.
|
String |
toString() |
protected Polarity(List<Pair<Monotonicity,MonotonicityType>> operatorsInNarrowingScopeOrder)
public Polarity(byte[] projectionFunction)
NaturalLogicRelations to
their projected relation.public NaturalLogicRelation projectLexicalRelation(NaturalLogicRelation lexicalRelation)
NaturalLogicRelation.FORWARD_ENTAILMENT) on this word,
then this function will tell you what relation holds between the new mutated fact and this fact.lexicalRelation - The lexical relation we are applying to this word.public boolean maintainsEntailment(NaturalLogicRelation lexicalRelation)
introducesNegation(NaturalLogicRelation) can be false. If this is the case, then
natural logic can neither verify nor disprove this mutation.public boolean introducesNegation(NaturalLogicRelation lexicalRelation)
maintainsEntailment(NaturalLogicRelation)} can be false. If this is the case, then
natural logic can neither verify nor disprove this mutation.public boolean isUpwards()
public boolean isDownwards()