CoreNLP icon indicating copy to clipboard operation
CoreNLP copied to clipboard

Apposition breaks Constituency parser in Corenlp 4.x while not in Corenlp 3.9.x

Open diegollarrull opened this issue 3 years ago • 1 comments

Issue:

Adding an apposition to a sentence breaks the constituency parse in CoreNLP 4.x (tested with 4.2.2 and 4.4.0) while it doesnt happen in CoreNLP 3.9.1

Steps to reproduce:

Parse with constituency parse the following two questions:

  • is there a way to fix this?
  • however, with this apposition, is there a way to fix this?

Expected output:

"there" should have the EX tag in both questions

Actual output:

CoreNLP 4.x: "there" has the EX tag in the first sentence and the RB tag in the sentence with the apposition CoreNLP 3.9: "there" has the EX tag in both questions

Please see attached images for visual confirmation

CoreNLP4 - No apposition: corenlp4_no_apposition

CoreNLP4 - with apposition: corenlp4_apposition

CoreNLP3 - No apposition: corenlp3_no_apposition

CoreNLP3 - with apposition: corenlp3_apposition

Thank you very much in advance

diegollarrull avatar Feb 17 '22 15:02 diegollarrull

If you use the POS tagger first, it seems to be a little more robust finding the EX tag with those rearrangements. Maybe give that a try?

Also, recommend using the SRParser (presumably the demo uses the older PCFG, or it wouldn't work without POS)

AngledLuffa avatar Feb 17 '22 21:02 AngledLuffa