1.1.1 • Published 7 years ago

text2token v1.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

travis build Codecov version license semantic-release

text2token

is a nodejs module that breaks down a corpus of text into lines and tokens.

Install

$ npm install text2token

Usage

The module has one method: text2token, which returns an object that contains a list of each line in your text file, as well as a list of all unique tokens.

$ node
> 
> var lib = require('text2token');

> var converted = lib.text2token('./src/bigtext.txt')

> converted.tokens
  [ '©',
  '2015',
  'GitHub,',
  'Inc.',
  'Terms',
  'Privacy',
  'Security',
  ..........

> converted.lines

[ '© 2015 GitHub, Inc. Terms Privacy Security Contact Help',
  'Status API Training Shop Blog About Pricing',
  'The quick brown fox jumped over the lazy dog'
 .......

MIT License 2015-2016 © Andy Craze & Contributors

1.1.1

7 years ago

1.1.0

7 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago