JSPM

word-mine

0.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q30379F
  • License MIT

Text mining module for splitting one or more files into words, arranging them, and count and order the words by most repeated

Package Exports

  • word-mine

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (word-mine) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

word-mine

Mine text from a string or file and get key words

##Example

There are a few examples available.

var mine = require('word-mine');

mine.parseText('three three three two two one', { order: true }, function(err, stats) {
  if(err) throw err;

  console.log(stats); // {'0': { 'three': 3}, '1': { 'two': 2 }, '2': { 'one' : 1 } }

});

##Usage options is an optional object to set order true || false

###mine#parseText(text, options, callback)

mine.parseText('How much wood would a wood chuck chuck', callback)

###mine#parseFiles(files[,...], options, callback) files can be a single file string or an array of strings, to represent multiple files. Text from all files is concated into one large string and then parsed as a whole.

mine.parseFiles(['woodchuck1.txt', 'woodchuck2.txt'], callback)

##License MIT