Package com.basistech.rosette.dm
Class RelationshipMention
java.lang.Object
com.basistech.rosette.dm.BaseAttribute
com.basistech.rosette.dm.Attribute
com.basistech.rosette.dm.RelationshipMention
- All Implemented Interfaces:
Serializable
A Relationship Mention describes arguments in a sentence and a predicate that connects them.
It also includes event-related information (such as the location and time the action represented by the mention
took place), an indication of the relationship's salience and modality, as well as metadata such the name of the
algorithm that yielded the extraction and the confidence thereof.
For example, the sentence "Leila Lopes, Miss Angola 2011, was crowned Miss Universe 2011 in Brazil on September 12th, 2011."
can yield a following RelationshipMention (among others):
arg1: [Leila Lopes(Q232501)]
predicate: [be crowned]
arg2: [Miss Universe 2011(Q932457)]
temporals: [on September 12th]
locatives: [In Brazil(Q155)]
context: [assertion]
source: [rules:2]
confidence: [0.679]
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.basistech.rosette.dm.Attribute
endOffset, startOffsetFields inherited from class com.basistech.rosette.dm.BaseAttribute
extendedProperties -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRelationshipMention(int startOffset, int endOffset, RelationshipComponent predicate, RelationshipComponent arg1, RelationshipComponent arg2, RelationshipComponent arg3, Set<RelationshipComponent> adjuncts, Set<RelationshipComponent> locatives, Set<RelationshipComponent> temporals, String source, Double confidence, Set<String> modality, Double salience, Map<String, Object> extendedProperties) -
Method Summary
Modifier and TypeMethodDescriptionReturns a set of adjuncts.getArg1()Returns the first argument.getArg2()Returns the second argument.getArg3()Returns the third argument.Returns the confidence value for the mentionReturns a set of locative expressions.Returns the 'modality' values for this relationship.Returns the predicate.Returns the salience of this relationship mention, ornullif no salience was calculated.Returns the relationship extraction device that produced this mention.Returns a set of temporal expressions.booleanReturns true if the predicate is synthetic, i.e.protected com.google.common.base.MoreObjects.ToStringHelperMethods inherited from class com.basistech.rosette.dm.Attribute
getEndOffset, getStartOffsetMethods inherited from class com.basistech.rosette.dm.BaseAttribute
getExtendedProperties, listOrNull, setExtendedProperty, toString
-
Constructor Details
-
RelationshipMention
protected RelationshipMention(int startOffset, int endOffset, RelationshipComponent predicate, RelationshipComponent arg1, RelationshipComponent arg2, RelationshipComponent arg3, Set<RelationshipComponent> adjuncts, Set<RelationshipComponent> locatives, Set<RelationshipComponent> temporals, String source, Double confidence, Set<String> modality, Double salience, Map<String, Object> extendedProperties)
-
-
Method Details
-
getPredicate
Returns the predicate. A predicate is usually the main verb, property or action that is expressed by the text.- Returns:
- the predicate of the relationship
-
getArg1
Returns the first argument. The first argument is usually the subject, agent or main actor of the relationship.- Returns:
- the first argument
-
getArg2
Returns the second argument. The second argument complements the predicate and is usually the object, theme or patient of the relationship.- Returns:
- the second argument
-
getArg3
Returns the third argument. The third argument is usually an additional object in ditransitive verbs.- Returns:
- the third argument
-
getAdjuncts
Returns a set of adjuncts. Adjuncts contain all optional parts of a relationship which are not temporal or locative expressions.- Returns:
- a set of adjuncts
-
getLocatives
Returns a set of locative expressions. Locatives usually express the locations where the action expressed by the relationship took place.- Returns:
- a set of locative expressions
-
getTemporals
Returns a set of temporal expressions. Temporals usually express the time in which the action expressed by the relationship took place.- Returns:
- a set of temporal expressions
-
getSource
Returns the relationship extraction device that produced this mention. For example, "statistical", "rules"- Returns:
- the relationship extraction source
-
getConfidence
Returns the confidence value for the mention- Returns:
- confidence value
-
hasSyntheticPredicate
public boolean hasSyntheticPredicate()Returns true if the predicate is synthetic, i.e. does not occurr in the text. For example, the sentence "meet Bill Flax, my brother in law" may yield a synthetic "is" predicate:[Bill Flax] [is] [my brother in law]
- Returns:
- boolean
-
getModality
Returns the 'modality' values for this relationship. 'Modality' is a catch-all term for a variety of contextual modifications of a relationship mention, such as negation or expression of an opinion. The possible values are defined by the particular extraction system. The Rosette relationship extractor currently emits "assertion", "negation", "question", "opinion" and "uncertainty"- Returns:
- the modality, or
nullif none.
-
getSalience
Returns the salience of this relationship mention, ornullif no salience was calculated. Note that salience values may be quantized.- Returns:
- the salience.
-
toStringHelper
protected com.google.common.base.MoreObjects.ToStringHelper toStringHelper()- Overrides:
toStringHelperin classAttribute
-