Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For more information concerning metadata fields and support for nested fields, see section Manual entities.

See detailed example below

Iterate Over a Single Entity Type:

A less common scenario is when you want to iterate over a single entity type.  You can do this by using "dummy."

eg "entity1/dummy" or "entity2,dummy"

See detailed example below

Multiplicative:

Create one association for every combination of entities of specified types.  Also referred to as combinatorial association.

...

eg. "iterateOver": "entity1,entity2"

See detailed example below

Iterate Over a Single Entity Type:

A less common scenario is when you want to use "dummy" to iterate over only one entity type,

eg "entity1/dummy" or "entity2,dummy"

 

creationCriteriaScripts

Association fields generated from the entity loop are placed in "_iterator". For

 

 

...

creationCriteriaScripts

Association fields generated from the entity loop are placed in "_iterator". For example, for "iterateOver": "entity1/entity2/geo_index", an _iterator object with the following fields is available in the Javascript: "_iterator.entity1_index", "_iterator.entity2_index", "_iterator.geo_index".

...

Code Block
 "associations": [
        {
            "entity1": "theft,2",
            "entity1_index": "theft,2/criminalactivity",
            "verb": "reported",
            "verb_category": "crime",
            "time_start": "2011-01-29T00:00:00",
            "geotag": {
                "lat": 38.9099278028729,
                "lon": -77.0436067765966
            },
            "assoc_type": "Summary"
        }
 

...

iterateOver

TODO: have a single entity version (after meta/before multi)

here's an example config element

...

Anchor
metadata
metadata
iterateOver a Metadata Field

The following code example is used to process email communication between two parties.  The association between the two entities is formed by iterating over the metadata object: "email_meta.Message-To"

Code Block
{
            "associations": [
                {
                    "assoc_type": "Event",
                    "entity1": "$SCRIPT( return _doc.metadata.eventtype_FILE_METADATA_[0].metadata.Author[0]; )",
                    "entity2": "VictimType$SCRIPT(return _value;)",
                    "iterateOver": "entity2/dummyemail_meta.Message-To",
                    "verbtime_categorystart": "suffered"$SCRIPT( return _doc.publishedDate;)",
              },  

here's some example entities,

Code Block
    "entitiesverb": ["emailed",
        {             "actualverb_namecategory": "emailed/communicated"Targeted,
Paramilitary/Private Security, Adult, Tribal from Pakistan",           }
 "dimension": "Who",           ]
        "disambiguated_name": "Targeted, Paramilitary/Private Security, Adult, Tribal from Pakistan",
 }

 

Metadata:

The email metadata "Message-To" used to generate the associations is included in the source block below.

Code Block
         ],
          "doccountemail_meta": 0,[
            "frequency": 3,[
             "index": "targeted, paramilitary/private security, adult, tribal from pakistan/victimtype", {
                    "relevanceCreation-Date": 0,
 [
          "totalfrequency": -1,             "type": "VictimType"2001-07-09T18:33:32Z"
        },         {   ],
         "actual_name": "Targeted, Non Official Public Figure, Adult, Tribal from Pakistan",  "Message-To": [
         "dimension": "Who",             "disambiguated_name": "Targeted, Non Official Public Figure, Adult, Tribal from Pakistan", "will.smith@enron.com"
                    ],
      "doccount": 0,             "frequencyContent-Type": [
1,               "index": "targeted, non official public figure, adult, tribal from pakistan"message/victimtyperfc822",
             "relevance": 0,      ],
      "totalfrequency": -1,             "typesubject": "VictimType"[
        },         {        "RE: Testing Preschedule workspace"
  "actual_name": "Targeted, Civilian, Adult, Tribal from Pakistan",            ],
"dimension": "Who",             "disambiguated_name": "Targeted, Civilian, Adult, Tribal from Pakistan"date",: [
           "doccount": 0,             "frequency": 2,2001-07-09T18:33:32Z"
              "index": "targeted, civilian, adult, tribal from pakistan/victimtype",
  ],
         "relevance": 0,             "totalfrequencyAuthor": -1,[
            "type": "VictimType"         },

Generates output:

Code Block
{  "cara.semperger@enron.com"
    "associations": [         {      ],
      "assoc_type": "Event",             "entity1Message-From": "Armed[
Attack",             "entity1_index": "armed attack/eventtype",             "entity2": "targeted, paramilitary/private security, adult, tribal from pakistan","cara.semperger@enron.com"
                   "entity2_index": "targeted, paramilitary/private security, adult, tribal from pakistan/victimtype", ]
                }
 "verb": "suffered",          ]
  "verb_category": "suffered"     ]


Output:

The output displays the association between the sender and receiver in the email correspondence.

Code Block
    },
"associations": [
        {
            "assoc_typeentity1": "Eventcara.semperger@enron.com",
            "entity1_index": "Armed Attackcara.semperger@enron.com/account",
            "entity1_indexverb": "armed attack/eventtypeemailed",
            "entity2verb_category": "targeted, non official public figure, adult, tribal from pakistanemailed/communicated",
            "entity2": "will.smith@enron.com",
            "entity2_index": "targeted"will.smith@enron.com/account",
non official public figure, adult, tribal from pakistan/victimtype",             "verb"time_start": "suffered",
            "verb_category": "suffered"
        },
 2001-07-09T14:33:32",
      {             "assoc_type": "Event",
        }
   "entity1": "Armed Attack",
       ],

iterateOver a single entity type

In some cases you will only want to iterate over a single entity type, rather than two or three, which is more common.  For these cases you can use "dummy" for iterateOver.

In the following source, iterateOver is setup to only iterate over the entity type: "VictimType."

Code Block
            {
                "assoc_type": "Event",
                "entity1": "$SCRIPT( return _doc.metadata.eventtype[0]; )",
                "entity2": "VictimType",
                "iterateOver": "entity2/dummy",
                "verb_category": "suffered"
            },

The code acts on the following entities in this example

Code Block
    "entities": [
        {
            "actual_name": "Targeted, Paramilitary/Private Security, Adult, Tribal from Pakistan",
            "dimension": "Who",
            "disambiguated_name": "Targeted, Paramilitary/Private Security, Adult, Tribal from Pakistan",
            "doccount": 0,
            "frequency": 3,
            "index": "targeted, paramilitary/private security, adult, tribal from pakistan/victimtype",
            "relevance": 0,
            "totalfrequency": -1,
            "type": "VictimType"
        },
        {
            "actual_name": "Targeted, Non Official Public Figure, Adult, Tribal from Pakistan",
            "dimension": "Who",
            "disambiguated_name": "Targeted, Non Official Public Figure, Adult, Tribal from Pakistan",
            "doccount": 0,
            "frequency": 1,
            "index": "targeted, non official public figure, adult, tribal from pakistan/victimtype",
            "relevance": 0,
            "totalfrequency": -1,
            "type": "VictimType"
        },
        {
            "actual_name": "Targeted, Civilian, Adult, Tribal from Pakistan",
            "dimension": "Who",
            "disambiguated_name": "Targeted, Civilian, Adult, Tribal from Pakistan",
            "entity1_indexdoccount": 0,
   "armed attack/eventtype"         "frequency": 2,
            "entity2index": "targeted, civilian, adult, tribal from pakistan" from pakistan/victimtype",
            "relevance": 0,
            "totalfrequency": -1,
            "entity2_indextype": "targeted, civilian, adult, tribal from pakistan/victimtype",VictimType"
        },

Output:

In the example output you can see that associations are only created based on entities of entity type: "VictimType."  Three associations are created, for each of the Victim Type entities specified above.

Code Block
{
    "associations": [
       "verb": "suffered", {
            "verbassoc_categorytype": "sufferedEvent",
          },

 

...

The following code example is used to process email communication between two parties.  The association between the two entities is formed by iterating over the metadata object: "email_meta.Message-To"

Code Block
{  "entity1": "Armed Attack",
            "associationsentity1_index": [
"armed attack/eventtype",
               {
      "entity2": "targeted, paramilitary/private security, adult, tribal from pakistan",
             "assocentity2_typeindex": "Event"targeted, paramilitary/private security, adult, tribal from pakistan/victimtype",
              "entity1verb": "$SCRIPT( return _doc.metadata._FILE_METADATA_[0].metadata.Author[0];)suffered",
            "verb_category": "suffered"
      "entity2": "$SCRIPT(return _value;)", },
        {
            "iterateOverassoc_type": "email_meta.Message-ToEvent",
       
            "time_startentity1": "$SCRIPT( return _doc.publishedDate;)Armed Attack",
            "entity1_index": "armed attack/eventtype",
     "verb": "emailed",      "entity2": "targeted, non official public figure, adult, tribal from pakistan",
     "verb_category": "emailed/communicated"       "entity2_index": "targeted, non official public figure, adult, tribal from pakistan/victimtype",
}             ]"verb": "suffered",
        }

TODO: show metadata

Output:

The output displays the association between the sender and receiver in the email correspondence.

Code Block
    "associationsverb_category": ["suffered"
        {},
        {
   "entity1": "cara.semperger@enron.com",             "entity1assoc_indextype": "cara.semperger@enron.com/accountEvent",
            "verbentity1": "emailedArmed Attack",
            "verbentity1_categoryindex": "emailedarmed attack/communicatedeventtype",
            "entity2": "will.smith@enron.comtargeted, civilian, adult, tribal from pakistan",
            "entity2_index": "will.smith@enron.com/accounttargeted, civilian, adult, tribal from pakistan/victimtype",
            "time_startverb": "2001-07-09T14:33:32suffered",
            "assocverb_typecategory": "Eventsuffered"
        },

   ],

 

Anchor
multi
multi
Multiplicative

...