props icon indicating copy to clipboard operation
props copied to clipboard

More on apposites

Open saraswat opened this issue 7 years ago • 0 comments

Consider:

The US President Barack Obama lives in Washington, D.C.

It would be nice if propS is able to discover that US President and Barack Obama are in a SameAs relation. And D,C. should be a mod on Washington?

Actual results:

1	The	_	DT	DT	_	5	det	_	_
2	US	_	NNP	NNP	_	5	nn	_	_
3	President	_	NNP	NNP	_	5	nn	_	_
4	Barack	_	NNP	NNP	_	5	nn	_	_
5	Obama	_	NNP	NNP	_	6	nsubj	_	_
6	lives	_	VBZ	VBZ	_	0	root	_	_
7	in	_	IN	IN	_	6	prep	_	_
8	Washington	_	NNP	NNP	_	7	pobj	_	_
9	,	_	,	,	_	8	punct	_	_
10	D.C.	_	NNP	NNP	_	8	appos	_	_

{'lf': [{'pred': 'SameAs',
         'sameAs_arg': [{'xref': ['lf', 1, 'prep_in', 0]},
                        {'xref': ['lf', 1, 'prep_in', 1]}],
         'text': 'Washington , D.C. '},
        {'pred': 'lives',
         'prep_in': ['D.C. ', 'Washington '],
         'subj': {'text': 'The US President Barack Obama ',
                  'word': ['US', 'President', 'Barack', 'Obama']},
         'text': 'The US President Barack Obama lives in Washington , D.C. '}],
 'sentence': 'The US President Barack Obama lives in Washington , D.C.'}
lives:(subj:The US President Barack Obama , prep_in:Washington )
lives:(subj:The US President Barack Obama , prep_in:D.C. )
SameAs:(sameAs_arg:Washington , sameAs_arg:D.C. )

Stanford NLP generates one NNP US President Barack Obama and this probably colors propS's analysis. But D.C. is identified as an appos.

Another, more complex sentence:

During May 2000 , the Serbian government intensified its efforts 
to silence opposition to the government of Yugoslav President 
Slobodan Milosevic.

Again, one would probably expect a SameAs between Yugoslav President and Slobodan Milosevic. Probably Stanford NLP is to blame.

Actual results:

1	During	_	IN	IN	_	8	prep	_	_
2	May	_	NNP	NNP	_	1	pobj	_	_
3	2000	_	CD	CD	_	2	num	_	_
4	,	_	,	,	_	8	punct	_	_
5	the	_	DT	DT	_	7	det	_	_
6	Serbian	_	NNP	NNP	_	7	nn	_	_
7	government	_	NN	NN	_	8	nsubj	_	_
8	intensified	_	VBD	VBD	_	0	root	_	_
9	its	_	PRP$	PRP$	_	10	poss	_	_
10	efforts	_	NNS	NNS	_	8	dobj	_	_
11	to	_	TO	TO	_	12	aux	_	_
12	silence	_	VB	VB	_	10	vmod	_	_
13	opposition	_	NN	NN	_	12	dobj	_	_
14	to	_	TO	TO	_	12	prep	_	_
15	the	_	DT	DT	_	16	det	_	_
16	government	_	NN	NN	_	14	pobj	_	_
17	of	_	IN	IN	_	16	prep	_	_
18	Yugoslav	_	NNP	NNP	_	21	nn	_	_
19	President	_	NNP	NNP	_	21	nn	_	_
20	Slobodan	_	NNP	NNP	_	21	nn	_	_
21	Milosevic	_	NNP	NNP	_	17	pobj	_	_
22	.	_	.	.	_	8	punct	_	_

{'lf': [{'dobj': {'mod': {'dobj': 'opposition ',
                          'pred': 'silence',
                          'prep_to': {'prep_of': {'text': 'Yugoslav President Slobodan Milosevic ',
                                                  'word': ['Yugoslav',
                                                           'President',
                                                           'Slobodan',
                                                           'Milosevic']},
                                      'text': 'the government of Yugoslav President Slobodan Milosevic ',
                                      'word': 'government'},
                          'text': 'to silence opposition to the government of Yugoslav President Slobodan Milosevic '},
                  'poss': 'its ',
                  'text': 'efforts to silence opposition to the government of Yugoslav President Slobodan Milosevic ',
                  'word': 'efforts'},
         'pred': 'intensified',
         'prep_during': {'text': 'May 2000 ', 'word': ['May', '2000']},
         'subj': {'text': 'the Serbian government ',
                  'word': ['Serbian', 'government']},
         'text': 'During May 2000 , the Serbian government intensified its efforts to silence opposition to the government of Yugoslav President Slobodan Milosevic '},
        {'dobj': {'xref': ['lf', 0, 'dobj']},
         'pred': 'have',
         'subj': {'xref': ['lf', 0, 'dobj', 'poss']},
         'text': 'its have efforts to silence opposition to the government of Yugoslav President Slobodan Milosevic '}],
 'sentence': 'During May 2000 , the Serbian government intensified its efforts to silence opposition to the government of Yugoslav President Slobodan Milosevic .'}
intensified:(subj:the Serbian government , dobj:its efforts to silence opposition to the government of Yugoslav President Slobodan Milosevic , prep_during:May 2000 )
have:(subj:its , dobj:efforts to silence opposition to the government of Yugoslav President Slobodan Milosevic )

saraswat avatar Jul 05 '17 16:07 saraswat