lab-ngrammer
Calculates ngrams from a json documnet
Last updated 2 years ago by mlablablab .
ISC · Original npm · Tarball · package.json
$ cnpm install lab-ngrammer 
SYNC missed versions from official npm registry.

NGrammer

Calculates and counts ngrams from a json document

to install

npm install --save lab-ngrammer

to use in a ts projext

import {NGrammer, CountedPhrase} from "lab-ngrammer"
const filePath = "some/file/path.json"
const omitStopWords = false
NGrammer.process(filePath, 30, omitStopWords).then( countedGrams => {
  ...
})

to use in command line

npm install -g lab-ngrammer
lab-ngrammer -f FILE_PATH [-n NUMBER_PHRASES] [-s]
  -f   the file path where to read the json file from
  -n   limits for max number of for each phrase word size group 
  -s   flag to tell ngrammer to remove stop words

expects file json format

{
  reviews: [
    { 
      text: "text to ngram"
      ...
    }
    ...
  ]
  ...
}

Current Tags

  • 1.2.0                                ...           latest (2 years ago)

10 Versions

  • 1.2.0                                ...           2 years ago
  • 1.1.6                                ...           2 years ago
  • 1.1.5                                ...           2 years ago
  • 1.1.4                                ...           2 years ago
  • 1.1.3                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (7)
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |