vered1986 / OKR

OKR: A Consolidated Open Knowledge Representation for Multiple Texts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

prepositional phrase of nouns is not captured as predicates

kleinay opened this issue · comments

According to OKR V1 spec, a prepositional phrase that modifies a noun should be considered as (explicit) proposition, where the preposition is the predicate. E.g., for "A mail from John lies on the desk.", we should have a proposition:
P1: [A1] from [A2]
which in turn is the argument of the main verb:
P2: [P1] lies on [A3].

In the props_wrapper code we can see lines that should deal with these cases (lines 274-300), but in the test, the behaviour is different. For example;

{'Entities': {'A1': ('mail', (1,)),
'A2': ('desk', (7,)),
'A3': ('John', (3,))},
'Predicates': {'P1': {'Arguments': ['A1', 'A2'],
'Bare predicate': ('lies on', (4, 5)),
'Head': {'Lemma': u'lie',
'POS': 'VBZ',
'Surface': ('lies', [4])},
'Template': '{A1} lies on {A2}'},
'P2': {'Arguments': ('A1', 'A3'),
'Bare predicate': ('IMPLICIT', (-1,)),
'Head': {'Lemma': 'IMPLICIT',
'POS': 'IMPLICIT',
'Surface': 'IMPLICIT'},
'Template': '{A1} {A3}'}},
'Sentence': 'a mail from John lies on the desk .'}

@OriShapira , take a look.