New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@chirrapp/sbd

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chirrapp/sbd

Split text into sentences using vanilla sentence boundary detection (SBD) algorithm

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Sentence boundary detection

The library is a fork of @Tessmore's sbd. Unlike the original version, the fork's focused on a single use case and removes extra options.

Split text into sentences with the vanilla strategy (i.e working ~95% of the time).

  • Split a text based on period, question- and exclamation marks.
  • Skips (most) abbreviations (Mr., Mrs., PhD.)
  • Skips numbers/currency.
  • Skips urls, websites, email addresses, phone nr.
  • Counts ellipsis and ?! as single punctuation.

Installation

The library is available as an npm package published at the GitHub Registry. To install @chirrapp/sbd run:

npm install @chirrapp/sbd --save
# Or using Yarn:
yarn add @chirrapp/sbd

Using

import { sentences } from "@chirrapp/sbd";

sentences(
  "On Jan. 20, former Sen. Barack Obama became the 44th President of the U.S. Millions attended the Inauguration."
);
//=> [
//=>   "On Jan. 20, former Sen. Barack Obama became the 44th President of the U.S.",
//=>   "Millions attended the Inauguration.",
//=> ]

License

MIT © Fabiën Tesselaar

Keywords

FAQs

Package last updated on 28 Aug 2023

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