Skip to content

Refactor to support other parsers #9

@saraswat

Description

@saraswat

The Stanford parser, like other parsers, makes errors. e.g.

Although the UK has long had an ambivalent attitude towards Europe, the hostility of the UK Independence Party towards the EU is mirrored by other European "insurgent" parties, such as the Freedom Party in the Netherlands and Front national (FN) in France.

( (S (SBAR (IN Although)
	   (S (NP (DT the) (NNP UK))
	      (VP (VBZ has) (ADVP (RB long))
		  (VP (VBN had) (NP (DT an) (JJ ambivalent) (NN attitude))
		      (PP (IN towards) (NP (NNP Europe)))))))
     (, ,) (NP (NP (DT the) (NN hostility))
	       (PP (IN of) (NP (NP (DT the) (NNP UK) (NNP Independence)
				   (NNP Party))
			       (PP (IN towards) (NP (DT the) (NNP EU))))))
     (VP (VBZ is) (VP (VBN mirrored)
		      (PP (IN by)
			  (NP (NP (NP (JJ other) (JJ European) (`` ``)
				      (NN insurgent) ('' '') (NNS parties))
				  (, ,) (PP (JJ such) (IN as)
					    (NP (NP (DT the) (NNP Freedom) (NNP Party))
						(PP (IN in) (NP (NP (DT the) (NNPS Netherlands))
								(CC and) (NP (NNP Front) (JJ national))))))
				  (PRN (-LRB- -LRB-) (NP (NNP FN)) (-RRB- -RRB-)))
			      (PP (IN in) (NP (NNP France)))))))
     (. .))
  )

(Incorrect scope for (PP (IN in)....) For downstream applications it would be much easier if parsers can be added in a plug and play fashion (maybe even multiple of them).

So refactoring to make propS be "just" a converter from an input dependency graph to its output form would be nice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions