Skip to content
This repository was archived by the owner on Sep 13, 2022. It is now read-only.

Conversation

rmalouf
Copy link
Contributor

@rmalouf rmalouf commented Dec 15, 2014

If anything goes wrong in zpar, it throws an error message expecting it to be caught by the top-level application. These need to be caught before returning to python, or the Python interpreter will crash.

@desilinguist
Copy link
Collaborator

Thanks so much for the pull request, Robert! This looks quite useful.

@dan-blanchard
Copy link

May I just chime in and say I had no idea you could throw things that weren't exceptions in C++. That's totally bizarre to me as a Python programmer.

desilinguist added a commit that referenced this pull request Dec 15, 2014
@desilinguist desilinguist merged commit 7f94be0 into EducationalTestingService:master Dec 15, 2014
@desilinguist
Copy link
Collaborator

Robert, do you happen to have an example where you ran into this issue that I could convert into a unit test?

@rmalouf
Copy link
Contributor Author

rmalouf commented Dec 15, 2014

The problem came up when I tried to parse a sentence with 400 or so words. Even though that's < 512 words, it complains that it's too long. Don't know why... but since sentences that are that long are almost always garbage anyway (like data table or something), I'm happy to skip them so long as they don't kill the python interpreter.

Thanks for making this interface! I've been using the stanford parser for a long time, and this convinced to try out something a bit faster. Have you considered making the interface more pythonic, e.g., passing python lists back and forth rather than strings?

@desilinguist
Copy link
Collaborator

Thanks, Robert. I will try to replicate that problem on my end and try to write a unit test if possible.

I am glad you like the interface. We are certainly finding it useful to have access to a faster (and fairly good parser) via Python. I hadn't really thought about passing lists back and forth but that could certainly be done. If you have any other thoughts about how to improve the interface, please feel free to file issues :)

@rmalouf rmalouf deleted the throw branch December 16, 2014 17:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants