Skip to content
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

Fix SentenceDetector causing StackOverflowError #148

Merged
merged 2 commits into from Mar 22, 2021
Merged

Fix SentenceDetector causing StackOverflowError #148

merged 2 commits into from Mar 22, 2021

Conversation

motoki317
Copy link
Contributor

Hello,
This pull request fixes the issue that SentenceDetector was causing StackOverflowError when it was fed with particular strings, such as strings followed by a lot of punctuations (, about 2000 or more).

As far as my understanding goes, the issue was caused by the regex containing repetitive alternative path.
https://stackoverflow.com/questions/7509905/java-lang-stackoverflowerror-while-using-a-regex-to-parse-big-strings/7510006#7510006

@kazuma-t kazuma-t merged commit 3622975 into WorksApplications:develop Mar 22, 2021
@kazuma-t
Copy link
Member

Thank you for your nice patch!

@motoki317 motoki317 deleted the impr/sentence-detector branch March 22, 2021 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants