You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.log(sentencize('I said "Look out" right before he banged his head'));>['I said "Look out" right before he banged his head']// This is correctconsole.log(sentencize('I said "Look out!" right before he banged his head'));>['I said "Look out!"','right before he banged his head']// This should be one sentence
From looking at the code it seems to be doing exactly as it's told, but doesn't seem quite right.
If it's a suffix aka " and previous token is a punctuation mark.!?, then split.
kgryte
changed the title
nlp-sentencize wrongly breaks sentences in quotation marks
[Bug]: nlp-sentencize wrongly breaks sentences in quotation marks
Oct 18, 2024
kgryte
changed the title
[Bug]: nlp-sentencize wrongly breaks sentences in quotation marks
[BUG]: nlp-sentencize wrongly breaks sentences in quotation marks
Oct 18, 2024
The Tool is likely splitting based on punctuation marks, it seems to be applying the case where the sentence ends with one of those punctuation marks, which in such cases isn't true.
The logic could be updated to check if the punctuation mark (!, ., ?) is within a quotation.
Description
As the title says.
Here are some quick examples
From looking at the code it seems to be doing exactly as it's told, but doesn't seem quite right.
If it's a suffix aka
"
and previous token is a punctuation mark.!?
, then split.Related Issues
#3013
Questions
No.
Demo
No response
Reproduction
Expected Results
Actual Results
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: