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

tkn

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tkn

Simple word tokeniser that ignores punctuation.

  • 0.0.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

tkn

Simple word tokeniser that ignores punctuation. Returning an Array of words.

Usage

tokenise(text, noStopWords). Simply returns an array of terms, without punctuation.

  • text is the string (text document) in which the calculations are to be performed on.
  • noStopWords defaults to true. Set to false if you want to include stop words–e.g words such as "I" and "the".
var tkn = require('tkn');

var str = "you're simply a test, a mere test";
var tokenised = tkn.tokenise(str);
>> ['simply', 'test', 'mere', 'test']

Keywords

FAQs

Package last updated on 17 May 2014

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