Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sentence-extractor

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sentence-extractor

A JS script to extract sentences from a piece of text (Advanced checking)

  • 1.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
30K
increased by58.52%
Maintainers
1
Weekly downloads
 
Created
Source

SentenceExtractor

A JS script to extract sentences from a piece of text (Advanced checking)

Download

npm install sentence-extractor

To use in code:

var extract = require('sentence-extractor').extract;

Useage example

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)' 
]*/

Authors

Program by Gavin Song

License

This program is licensed under the GNU General Public License v3.0. See LICENSE for more details.

Keywords

FAQs

Package last updated on 06 May 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc