[BUG]: nlp-sentencize wrongly splits sentences with multiple punctuation marks #3013
Open
2 tasks done
Labels
Bug
Something isn't working.
Description
Hello! Not sure if this is the right place, but can't post in the other repo.
Using
@stdlib/[email protected]
with phrases like'HAPPY BIRTHDAY!!!'
will incorrectly return a sentence for every punctuation mark:The above examples should be considered one sentence each
Weirdly enough it works well with ellipsis and phrases ending in
!!!1!!11!!!
and stuff like that. Such as:This one is fine.
Cheers!
Related Issues
No response
Questions
No response
Demo
No response
Reproduction
const sentencize = require('@stdlib/nlp-sentencize');
console.log(sentencize('SURPRISE!!!'));
Expected Results
['SURPRISE!!!']
Actual Results
['SURPRISE!', '!', '!']
Version
0.2.2
Environments
Node.js
Browser Version
No response
Node.js / npm Version
v22.9.0
Platform
Windows 11
Checklist
The text was updated successfully, but these errors were encountered: