Added timeout to control potential infinite loops #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi!
I have been using this sentence-splitter for a while and never had any problem. Though, yesterday I was processing a large corpus in Catalan and I found an issue. The program never ends and it does not advance.
It looks like there is something in this line and the issue could be related to the following reasons:
The code to reproduce the bug is the following:
I know that the code example can be seen as an adversarial example. However, I would like to point out that this example takes longer than processing 12GB corpus with this library. I am not sure whether it is a bug or a rare example. Anyway, I think adding the timeout is beneficial.
BTW, I want to use this occasion to say that the library is outstanding, congrats!
Thanks,
Asier