-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expandall stalling. #11
Comments
I haven't seen that, at least on the test texts currently uploaded. Are these full articles you're running against, now? |
Actually on both full articles and abstracts. I just checked and the thing that's causing problems right now is a single-letter abbreviation (in this case s). It's not even a true abbreviation. It's an optional pluralization: brain structure(s). |
And the stall is coming from |
In |
It's returning structure(s because we have a line that finds ' (' in the full term, which doesn't exist in this case. When the substring isn't found in a string, the Then, it gets stuck in the A perhaps 'hack-y' way to do it would be to say that |
Okay maybe requiring that there be a space is enough. It looks like it fixed it for me. |
As soon as you pushed the commit the Travis CI build started— looks like both versions of python still pass! |
Oooh wow I totally forgot about CI. I need to stop directly committing and start doing PRs from a fork like you do. Anyway, looks like it's solved at the moment. |
Yeah so that was one problem causing infinite loops. Another one just came up. This is definitely a false positive, but the identified abbreviation is X and the full term is XX. I think it has something to do with keeping track of where to start searching for the full term after replacing it once here. Maybe when the "abbreviation" X is replaced with XX, it's extending past the new |
I think I've managed to deal with the new problem in #12. |
I think it's a reasonable fix, and the builds are still passing. I went ahead and merged #12 and will close this issue unless something else arises. Thanks for catching and fixing that! |
I don't know if the regular expressions are getting too long, but I'm trying to run
expandall
on a large number of text files and it's getting stuck on some of them. @emdupre, before I dig into this, have you encountered it?I'm guessing that this also applies to
findall
, but I haven't tested it.The text was updated successfully, but these errors were encountered: