dair-iitd / OpenIE-standalone

Other
566 stars 73 forks source link

Error (?) in List index (?) output #2

Closed nlothian closed 6 years ago

nlothian commented 6 years ago

Hi,

Is the format for output defined anywhere? I've been guessing how it works, so this may not be a bug. If not, a pointer to the docs would be great, and especially some kind of parsing code.

If I run OpenIE 5 on the following sentence in column mode:

This affects Catalyst switches, Embedded Service 2020 switches, Enhanced Layer 2 EtherSwitch Service Module, Enhanced Layer 2/3 EtherSwitch Service Module, Gigabit Ethernet Switch Module (CGESM) for HP, IE Industrial Ethernet switches, ME 4924-10GE switch, RF Gateway 10, and SM-X Layer 2/3 EtherSwitch Service Module.

The first extraction is:

SimpleArgument(This,List([0, 4))) Relation(affects,List([5, 12))) SimpleArgument(2/3 EtherSwitch Service Module,List([13, 43)))

It appears the List arguments are supposed to define indexes into the sentence. If this is the case, then I think the brackets are wrong:

Current output: List([0, 4)

Should be: List([0, 4]) (note the missing "]" in the current output).

swarnaHub commented 6 years ago

List[0,4) is correct given that 'This' is a 4 letter word indexing from 0 to 3 in the sentence. My suggestion would be to not read much into the spans of the arguments or relations, because all you care about are the extractions(tuples of the form (arg1; relation; arg2))

To facilitate better viewing of the extractions, run in 'simple' mode after turning on the '--binary' flag on. You will see each extractions of the form 'confidence \t (arg1; relation; arg2)'

Let me know if this resolves your doubt. I will close the issue then.

nlothian commented 6 years ago

Thanks, thanks useful.

My real issue is the missing square bracket in the machine-readable format.

swarnaHub commented 6 years ago

Closing the issue.