What is An Event?
Events are
Basic Event Specification
The following code demonstrates how to specify a basic event (Note: The sample event specification and sample event output below is extracted from a MySql Database Source the full content of which can be viewed here.):
{ ... "events" : [ { "entity1" : "$metadata.offense,$metadata.method", "verb" : "reported", "verb_category" : "crime", "time_start" : "$metadata.reportdatetime", "geo_index" : "Location", "geotag" : { "latitude" : "$metadata.latitude", "longitude" : "$metadata.longitude"} }, ], ... }
In the basic example above the following fields have been specified:
- entity1
A free form text field containing information about the event "subject", i.e. an entity's disambiguous name. - entity1_index
If present this is the "gazateer_index" field of the entity matching the entity1 disambiguous name above. - verb
A free form text field describing the event "verb" - verb_category
Also a free form text field describing the event "verb", but intended to group related verbs together (eg "travel" for verbs: "flew", "drove") - geoindex
If the event geotag maps into an entity from the parent document then this field is the "gazateer_index" of that entity - geotag
- latitude
String containing a floating point representation of latitude - longitude
String containing a floating point representation of longitude
- latitude
The result of the event specification above can be seen in the sample output below:
{ ... "events" : [ { "entity1" : "robbery gun", "entity1_index" : "robbery gun/criminalactivity", "verb" : "reported", "verb_category" : "crime", "geotag" : { "latitude" : "38.9051666534795", "longitude" : "-77.0121735726172" }, "geo_index" : "1100 b/o 1st st nw washington dc/place", "event_type" : "Event" } ], ... }
In the sample output above please note that the Infinit.e harvester automatically generates the following fields as appropriate:
- event_type
"Event", "Fact", "Summary"
The "event_type" field sub-categorizes the "event" object into one of three types, "Event", "Fact", or "Summary". Examples provided below should make the distinction clearer, but it can be simply described as follows:- "Event": link multiple entities (via "entity1_index", "entity2_index", "geo_index") and represent a transient activity (eg travel)
- "Fact": link multiple entities like "Events" but represent (transient or permanent) relationships (eg being president)
- "Summary": generally link 1 entity to a free text (eg a quotation: "Obama says...").
Specifying Multiplicative Events
The Structured Analysis Harvester supports the creation of events using the following specification format for multiplicative events:
{ ... "events" : [ { "iterateOver" : "entity1/entity2/geo_index", "verb" : "attacked", "verb_category" : "assault/attack", "entity1" : "PersonPerpetrator", "entity2" : "VictimType", "geo_index" : "Location", "time_start" : "$SCRIPT( return _doc.metadata.incidentdate[0]; )" }, ], ... }
Multiplicative Events:
Multiplicative events can be created using a combination of the following
Example: In the Multiplicative Event Specification shown above an event will be created for each combination of the following entity types: PersonPerpetrator, VictimType, and Location. Using the event source found below the Structured Analysis Harvester will generate a total of two (2) events based on the following math: 1 Perpetrator X 2 Victims X 1 Location = 2 Events.
In the example source below
{ ... "entities" : [ { "actual_name" : "Batticaloa,North Eastern Province,Sri Lanka", "dimension" : "Where", "disambiguous_name" : "Batticaloa,North Eastern Province,Sri Lanka", "doccount" : NumberLong(18), "frequency" : 1, "gazateer_index" : "batticaloa,north eastern province,sri lanka/location", "geotag" : { "latitude" : "7.7166667", "longitude" : "81.7" }, "totalfrequency" : NumberLong(18), "type" : "Location" }, { "actual_name" : "Targeted, Police, Adult from Sri Lanka", "dimension" : "Who", "disambiguous_name" : "Targeted, Police, Adult from Sri Lanka", "doccount" : NumberLong(47), "frequency" : 3, "gazateer_index" : "targeted, police, adult from sri lanka/victimtype", "totalfrequency" : NumberLong(161), "type" : "VictimType" }, { "actual_name" : "Targeted, Military, Adult, Combatant from Sri Lanka", "dimension" : "Who", "disambiguous_name" : "Targeted, Military, Adult, Combatant from Sri Lanka", "doccount" : NumberLong(20), "frequency" : 1, "gazateer_index" : "targeted, military, adult, combatant from sri lanka/victimtype", "totalfrequency" : NumberLong(147), "type" : "VictimType" }, { "actual_name" : "Secular/Political/Anarchist from Sri Lanka", "dimension" : "Who", "disambiguous_name" : "Secular/Political/Anarchist from Sri Lanka", "doccount" : NumberLong(200), "frequency" : 1, "gazateer_index" : "secular/political/anarchist from sri lanka/personperpetrator", "totalfrequency" : NumberLong(200), "type" : "PersonPerpetrator" }, ... ], ... }
The following Multiplicative Event Output example shows how the Structured Analysis Harvester would generate two events from the source data and specification show above:
{ ... "events" : [ { "entity1" : "secular/political/anarchist from sri lanka", "entity1_index" : "secular/political/anarchist from sri lanka/personperpetrator", "verb" : "attacked", "verb_category" : "assault/attack", "entity2" : "targeted, police, adult from sri lanka", "entity2_index" : "targeted, police, adult from sri lanka/victimtype", "time_start" : "09/07/2005", "geotag" : { "latitude" : "7.7166667", "longitude" : "81.7" }, "geo_index" : "batticaloa,north eastern province,sri lanka/location", "event_type" : "Event" }, { "entity1" : "secular/political/anarchist from sri lanka", "entity1_index" : "secular/political/anarchist from sri lanka/personperpetrator", "verb" : "attacked", "verb_category" : "assault/attack", "entity2" : "targeted, military, adult, combatant from sri lanka", "entity2_index" : "targeted, military, adult, combatant from sri lanka/victimtype", "time_start" : "09/07/2005", "geotag" : { "latitude" : "7.7166667", "longitude" : "81.7" }, "geo_index" : "batticaloa,north eastern province,sri lanka/location", "event_type" : "Event" } ], ... }