Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Sample output from extract-relationships
{ entities:
[ { type: 'PERSON',
class: 'SPC',
level: 'NAM',
mentions:
[ { mtype: 'NAM',
role: 'PERSON',
class: 'SPC',
text: 'Dale Lane',
location: { begin: 0, end: 8, 'head-begin': 0, 'head-end': 8 } },
{ mtype: 'NAM',
role: 'PERSON',
class: 'SPC',
text: 'Dale',
location: { begin: 60, end: 63, 'head-begin': 60, 'head-end': 63 } },
{ mtype: 'NOM',
role: 'OCCUPATION',
class: 'SPC',
text: 'developer',
location: { begin: 21, end: 29, 'head-begin': 21, 'head-end': 29 } },
{ mtype: 'NOM',
role: 'PERSON',
class: 'SPC',
text: 'student',
location: { begin: 132, end: 138, 'head-begin': 132, 'head-end': 138 } },
{ mtype: 'PRO',
role: 'PERSON',
class: 'SPC',
text: 'He',
location: { begin: 40, end: 41, 'head-begin': 40, 'head-end': 41 } },
{ mtype: 'PRO',
role: 'PERSON',
class: 'SPC',
text: 'he',
location: { begin: 123, end: 124, 'head-begin': 123, 'head-end': 124 } } ] },
{ type: 'ORGANIZATION',
class: 'SPC',
level: 'NAM',
subtype: 'COMMERCIAL',
mentions:
[ { mtype: 'NAM',
role: 'ORGANIZATION',
class: 'SPC',
text: 'IBM',
location: { begin: 35, end: 37, 'head-begin': 35, 'head-end': 37 } } ] },
{ type: 'GPE',
class: 'SPC',
level: 'NAM',
subtype: 'AREA',
mentions:
[ { mtype: 'NAM',
role: 'LOCATION',
class: 'SPC',
text: 'UK',
location: { begin: 78, end: 79, 'head-begin': 78, 'head-end': 79 } } ] },
{ type: 'GPE',
class: 'SPC',
level: 'NAM',
mentions:
[ { mtype: 'NAM',
role: 'LOCATION',
class: 'SPC',
text: 'Eastleigh',
location: { begin: 99, end: 107, 'head-begin': 99, 'head-end': 107 } },
{ mtype: 'NOM',
role: 'LOCATION',
class: 'SPC',
text: 'town',
location: { begin: 87, end: 90, 'head-begin': 87, 'head-end': 90 } } ] },
{ type: 'ORGANIZATION',
class: 'SPC',
level: 'NAM',
mentions:
[ { mtype: 'NAM',
role: 'ORGANIZATION',
class: 'SPC',
text: 'University of Bath',
location: { begin: 147, end: 164, 'head-begin': 147, 'head-end': 164 } } ] },
{ type: 'DATE',
class: 'SPC',
level: 'NONE',
mentions:
[ { mtype: 'NONE',
role: 'DATE',
class: 'SPC',
text: '2003',
location: { begin: 54, end: 57, 'head-begin': 54, 'head-end': 57 } } ] } ],
relationships:
[ { type: 'employedBy',
entities:
{ one: { type: 'PERSON', class: 'SPC', level: 'NAM' },
two:
{ type: 'ORGANIZATION',
class: 'SPC',
level: 'NAM',
subtype: 'COMMERCIAL' } },
mentions:
[ { class: 'SPECIFIC',
modality: 'ASSERTED',
tense: 'UNSPECIFIED',
one:
{ mtype: 'NOM',
etype: 'PERSON',
role: 'OCCUPATION',
class: 'SPC',
text: 'developer',
location: { begin: 21, end: 29, 'head-begin': 21, 'head-end': 29 } },
two:
{ mtype: 'NAM',
etype: 'ORGANIZATION',
role: 'ORGANIZATION',
class: 'SPC',
text: 'IBM',
location: { begin: 35, end: 37, 'head-begin': 35, 'head-end': 37 } } } ] },
{ type: 'locatedAt',
entities:
{ one: { type: 'PERSON', class: 'SPC', level: 'NAM' },
two: { type: 'GPE', class: 'SPC', level: 'NAM', subtype: 'AREA' } },
mentions:
[ { class: 'SPECIFIC',
modality: 'ASSERTED',
tense: 'UNSPECIFIED',
one:
{ mtype: 'NAM',
etype: 'PERSON',
role: 'PERSON',
class: 'SPC',
text: 'Dale',
location: { begin: 60, end: 63, 'head-begin': 60, 'head-end': 63 } },
two:
{ mtype: 'NAM',
etype: 'GPE',
role: 'LOCATION',
class: 'SPC',
text: 'UK',
location: { begin: 78, end: 79, 'head-begin': 78, 'head-end': 79 } } } ] },
{ type: 'locatedAt',
entities:
{ one: { type: 'PERSON', class: 'SPC', level: 'NAM' },
two: { type: 'GPE', class: 'SPC', level: 'NAM' } },
mentions:
[ { class: 'SPECIFIC',
modality: 'ASSERTED',
tense: 'UNSPECIFIED',
one:
{ mtype: 'NAM',
etype: 'PERSON',
role: 'PERSON',
class: 'SPC',
text: 'Dale',
location: { begin: 60, end: 63, 'head-begin': 60, 'head-end': 63 } },
two:
{ mtype: 'NOM',
etype: 'GPE',
role: 'LOCATION',
class: 'SPC',
text: 'town',
location: { begin: 87, end: 90, 'head-begin': 87, 'head-end': 90 } } } ] },
{ type: 'educatedAt',
entities:
{ one: { type: 'PERSON', class: 'SPC', level: 'NAM' },
two: { type: 'ORGANIZATION', class: 'SPC', level: 'NAM' } },
mentions:
[ { class: 'SPECIFIC',
modality: 'ASSERTED',
tense: 'UNSPECIFIED',
one:
{ mtype: 'NOM',
etype: 'PERSON',
role: 'PERSON',
class: 'SPC',
text: 'student',
location: { begin: 132, end: 138, 'head-begin': 132, 'head-end': 138 } },
two:
{ mtype: 'NAM',
etype: 'ORGANIZATION',
role: 'ORGANIZATION',
class: 'SPC',
text: 'University of Bath',
location: { begin: 147, end: 164, 'head-begin': 147, 'head-end': 164 } } } ] } ] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment