cltl / morphosyntactic_parser_nl

Morphosyntactic parser for Dutch based on the Alpino parser
Apache License 2.0
5 stars 4 forks source link

Check that alpino generated at least one dependency #5

Closed vanatteveldt closed 8 years ago

vanatteveldt commented 8 years ago

Simple check to make sure Alpino generates at least one dependency.

It might be better to do a post-hoc check that the generated xml has certain properties (e.g. contains a dependency layer), but for now this will at least signal the version problem.

Unfortunately, Alpino doesn't throw an error, so if you have a document that legitimately contains no dependencies (perhaps it's a single word), this will raise a false negative, so I guess it's up to you whether you think this is a good addition?

rubenIzquierdo commented 8 years ago

We could also keep it as a warning and not an exception, as it may be better to get the terms, pos-tags and constituents (without dependencies) rather than getting nothing

vanatteveldt commented 8 years ago

I would be afraid that in an automatic pipelining system such warnings would not easily be seen, while the problem is indicative of a faulty install, right?

rubenIzquierdo commented 8 years ago

So maybe the best is to include a sample test file in the rpository, with a couple of sentences, and a script to automatically run the parser once installed and compare against the "gold" output with dependencies and all that should produce. Once you are sure your Alpino installation it's ok, you can just keep running the pipeline without supervision

vanatteveldt commented 8 years ago

That makes a lot of sense. If you create a test script (I would suggest nose tests, those are quite easy to set up) I can also create a .travis file for you to automatically install a named Alpino version and test the output. Do you want me to create a 'stub' test file?

(see e.g. the frog test file in https://github.com/amcat/nlpipe/blob/master/tests/test_frog.py that I use in nlpipe)

rubenIzquierdo commented 8 years ago

Ok, I will create a test file for the parser following the one you use for Frog

Ruben Izquierdo Bevia Vrije University of Amsterdam ruben.izquierdobevia@vu.nlmailto:ruben.izquierdobevia@vu.nl http://rubenizquierdobevia.com/

On 05 Apr 2016, at 17:22, Wouter van Atteveldt notifications@github.com<mailto:notifications@github.com> wrote:

That makes a lot of sense. If you create a test script (I would suggest nose tests, those are quite easy to set up) I can also create a .travis file for you to automatically install a named Alpino version and test the output. Do you want me to create a 'stub' test file?

(see e.g. the frog test file in https://github.com/amcat/nlpipe/blob/master/tests/test_frog.py that I use in nlpipe)

— You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHubhttps://github.com/cltl/morphosyntactic_parser_nl/pull/5#issuecomment-205855617