Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
sentence-extractor
Advanced tools
A JS script to extract sentences from a piece of text (Advanced checking)
A JS script to extract sentences from a piece of text (Advanced checking)
npm install sentence-extractor
To use in code:
var extract = require('sentence-extractor').extract;
extract("This is a javascript sentence extractor, it can accurately extract sentences. Isn't this cool? It even parses abbreviations like Dr. and St. correctly. U.S. Company in Washington D.C. in your text? No problem we'll extract it just as well. Even dates like 1.5.2017 work! As long as your sentence follows basic grammar rules and doesn't use any absurd abbreviations it should work fine. You can add your own abbreviations to extract.js if needed. Have fun!");
/*Result
[ 'This is a javascript sentence extractor, it can accurately extract sentences.',
' Isn\'t this cool?',
' It even parses abbreviations like Dr. and St. correctly.',
' U.S. Company in Washington D.C. in your text?',
' No problem we\'ll extract it just as well.',
' Even dates like 1.5.2017 work!',
' As long as your sentence follows basic grammar rules and doesn\'t use any absurd abbreviations it should work fine.',
' You can add your own abbreviations to extract.js if needed.',
' Have fun!' ]
*/
//You can also use your own custom abbreviations (Such as dr. or mrs.) or sentence endings
//Example of using ) to end sentences and po. as an abbreviation
extract("Sentences end in ) Another sentence for po. test)", ["po"], [")"] );
/*[
'Sentences end in )',
' Another sentence for po. test)'
]*/
Program by Gavin Song
This program is licensed under the GNU General Public License v3.0. See LICENSE for more details.
FAQs
A JS script to extract sentences from a piece of text (Advanced checking)
The npm package sentence-extractor receives a total of 4,755 weekly downloads. As such, sentence-extractor popularity was classified as popular.
We found that sentence-extractor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.