10000 GitHub - LabCo/ngrammer: Calculates and counts ngrams from a json document
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

LabCo/ngrammer

< 8000 a type="button" aria-label="Go to Branches page" href="/LabCo/ngrammer/branches" class="prc-Button-ButtonBase-c50BI OverviewContent-module__Button_1--_1Ng2" data-loading="false" data-no-visuals="true" data-size="medium" data-variant="invisible" aria-describedby=":Relab:-loading-announcement">

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"
      ...
    }
    ...
  ]
  ...
}

About

Calculates and counts ngrams from a json document

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
0