Skip to content

Anatomy of Mentions

Keith Alcock edited this page Dec 12, 2019 · 21 revisions

Mentions

The mapping between what in Scala is a Mention and what in JSON-LD is an Extraction is detailed in the table below.

Scala JSON-LD
Mention Extraction Argument
Class Trigger Arguments Label Type Subtype Type
TextBound - - N/A concept entity -
Event+ TextBound cause
effect
Causal relation causation source
destination
Event+ TextBound cause
effect
Correlation relation correlation argument
argument
Event+ TextBound group
groupModifier
moveTo
moveFrom
moveThrough
timeStart
timeEnd
time
HumanMigration relation migration group
groupModifier
moveTo
moveFrom
moveThrough
timeStart
timeEnd
time
Relation - true N/A - - -
CrossSentence* - cause
effect
Coreference relation coreference anchor
reference

+Including the CrossSentenceEventMention that may describe an event.
*The CrossSentenceMention includes an anchor and neighbor at construction.

Both trigger and arguments must be provided at object construction time as they are essential to the identity of the mention. All mentions support attachments. They can be added and removed later via the newWithAttachment and newWithoutAttachment methods. However, as the names imply, new objects are created and references to their older versions will not be forwarded.

Attachments

There is a similar mapping between Scala Attachment objects and JSON-LD State.

Scala JSON JSON-LD
Class Category Optional Argument Label State type
Quantification Triggered "adverb" Quantification QUANT
Property Triggered "quantifier" Property PROP
Increase Triggered "quantifier" Increase INC
Decrease Triggered "quantifier" Decrease DEC
Hedging Triggered - Hedging HEDGE
Negation Triggered - Negation NEGATION
Time Context - Time TIMEX
Location Context - Location LocationExp
DCTime Context - Time TIMEX
CountAttachment Context - Count COUNT

A category of Triggered implies both a trigger and quantifications in Scala. The context category involves neither. Attachments are called State in JSON-LD and an attachment's quantifier is called a Modifier. An argument can optionally be converted to an attachment using the quoted string key shown.

Others

Not all fields are written to the JSON-LD files. When objects are re-read from the files, they may not be identical to the original version. This table itemizes the unwritten fields and specifies the new values that are used instead of the originals.

Class Field Type Value
Sentence syntacticTree Option[Tree] None
Sentence relations Option[Array[RelationTriple]] None
Mention keep Boolean true
EventMention paths Map[String, Map[Mention, SynPath]] Map.empty
RelationMention paths Map[String, Map[Mention, SynPath]] Map.empty
EidosMention canonicalNameParts Array[String] recalculated version*
EidosMention grounding Map[String, OntologyGrounding] recalculated version*

*These are each a lazy val which cannot be initialized through the constructor. They are typically only used for JSON-LD output at which time the values are calculated with the help of a Canonicalizer and a MultiOntologyGrounding which are part of EidosSystem. Neither of these is serialized to JSON-LD. However, assuming that EidosSystem is configured the same way when it reads the JSON-LD as when it wrote it, the recalculated version will match the original version. The deserializer reads Odin mentions and then converts them to Eidos mentions in the usual way (EidosMention.asEidosMentions) without attempting to fill in these two specialized Eidos fields.