Changed dependency to wordnet-db (was WNdb). Bump to 0.1.16.
This commit is contained in:
parent
5ce7553651
commit
fe52692f45
|
@ -0,0 +1,5 @@
|
||||||
|
language: node_js
|
||||||
|
node_js:
|
||||||
|
- "stable"
|
||||||
|
before_script:
|
||||||
|
- npm install -g jasmine-node
|
39
README.md
39
README.md
|
@ -1,19 +1,11 @@
|
||||||
wordpos
|
wordpos
|
||||||
=======
|
=======
|
||||||
|
|
||||||
wordpos is a set of part-of-speech (POS) utilities for Node.js using [natural's](http://github.com/NaturalNode/natural) WordNet module.
|
[![NPM version](https://img.shields.io/npm/v/wordpos.svg)](https://www.npmjs.com/package/wordpos)
|
||||||
|
[![Build Status](https://img.shields.io/travis/moos/wordpos/master.svg)](https://travis-ci.org/moos/wordpos)
|
||||||
|
|
||||||
|
wordpos is a set of *fast* part-of-speech (POS) utilities for Node.js using [natural's](http://github.com/NaturalNode/natural) WordNet module, offering **30x** performance over the natural.
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
npm install -g wordpos
|
|
||||||
|
|
||||||
To run spec:
|
|
||||||
|
|
||||||
npm install -g jasmine-node
|
|
||||||
cd spec
|
|
||||||
jasmine-node wordpos_spec.js --verbose
|
|
||||||
jasmine-node validate_spec.js --verbose
|
|
||||||
|
|
||||||
## Quick usage
|
## Quick usage
|
||||||
|
|
||||||
|
@ -33,7 +25,7 @@ wordpos.isAdjective('awesome', function(result){
|
||||||
// true 'awesome'
|
// true 'awesome'
|
||||||
```
|
```
|
||||||
|
|
||||||
Command-line:
|
Command-line: (see [CLI](bin))
|
||||||
```bash
|
```bash
|
||||||
$ wordpos def git
|
$ wordpos def git
|
||||||
git
|
git
|
||||||
|
@ -49,6 +41,17 @@ little
|
||||||
British
|
British
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
npm install -g wordpos
|
||||||
|
|
||||||
|
To run spec:
|
||||||
|
|
||||||
|
npm install -g jasmine-node
|
||||||
|
cd spec
|
||||||
|
jasmine-node wordpos_spec.js --verbose
|
||||||
|
jasmine-node validate_spec.js --verbose
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
@ -175,9 +178,8 @@ wordpos.lookupAdjective('awesome', console.log);
|
||||||
synonyms: [ 'amazing', 'awe-inspiring', 'awesome', 'awful', 'awing' ],
|
synonyms: [ 'amazing', 'awe-inspiring', 'awesome', 'awful', 'awing' ],
|
||||||
lexId: '0',
|
lexId: '0',
|
||||||
ptrs: [],
|
ptrs: [],
|
||||||
gloss: 'inspiring awe or admiration or wonder; "New York is an amazing city"; "the Grand Canyon is an awe-inspiring
|
gloss: 'inspiring awe or admiration or wonder; <snip> awing majesty, so vast, so high, so silent" '
|
||||||
sight"; "the awesome complexity of the universe"; "this sea, whose gently awful stirrings seem to speak of some hidden s
|
} ], 'awesome'
|
||||||
oul beneath"- Melville; "Westminster Hall\'s awing majesty, so vast, so high, so silent" ' } ], 'awesome'
|
|
||||||
```
|
```
|
||||||
In this case only one lookup was found. But there could be several.
|
In this case only one lookup was found. But there could be several.
|
||||||
|
|
||||||
|
@ -230,10 +232,10 @@ Returns tokenized array of words in `text`, less duplicates and stopwords. This
|
||||||
|
|
||||||
|
|
||||||
#### WordPOS.WNdb
|
#### WordPOS.WNdb
|
||||||
Access to the [WNdb](https://github.com/moos/WNdb) object containing the dictionary & index files.
|
Access to the [wordnet-db](https://github.com/moos/wordnet-db) object containing the dictionary & index files.
|
||||||
|
|
||||||
#### WordPOS.natural
|
#### WordPOS.natural
|
||||||
Access to underlying [natural](http://github.com/NaturalNode/natural) module. For example, WordPOS.natural.stopwords is the list of stopwords.
|
Access to underlying [natural](https://github.com/NaturalNode/natural) module. For example, WordPOS.natural.stopwords is the list of stopwords.
|
||||||
|
|
||||||
|
|
||||||
## Fast Index
|
## Fast Index
|
||||||
|
@ -279,6 +281,9 @@ done in 1375 msecs
|
||||||
|
|
||||||
## Changes
|
## Changes
|
||||||
|
|
||||||
|
0.1.16
|
||||||
|
- Changed dependency to wordnet-db (renamed from WNdb)
|
||||||
|
|
||||||
0.1.15
|
0.1.15
|
||||||
- Added `syn` (synonym) and `exp` (example) CLI commands.
|
- Added `syn` (synonym) and `exp` (example) CLI commands.
|
||||||
- Fixed `rand` CLI command when no start word given.
|
- Fixed `rand` CLI command when no start word given.
|
||||||
|
|
12
package.json
12
package.json
|
@ -3,16 +3,16 @@
|
||||||
"author": "Moos <mooster@42at.com>",
|
"author": "Moos <mooster@42at.com>",
|
||||||
"keywords": ["natural", "language", "wordnet", "adjectives", "nouns", "adverbs", "verbs"],
|
"keywords": ["natural", "language", "wordnet", "adjectives", "nouns", "adverbs", "verbs"],
|
||||||
"description": "wordpos is a set of part-of-speech utilities for Node.js using natural's WordNet module.",
|
"description": "wordpos is a set of part-of-speech utilities for Node.js using natural's WordNet module.",
|
||||||
"version": "0.1.15",
|
"version": "0.1.16",
|
||||||
"homepage": "https://github.com/moos/wordpos",
|
"homepage": "https://github.com/moos/wordpos",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.6"
|
"node": ">=0.6"
|
||||||
},
|
},
|
||||||
"bin": "./bin/wordpos-cli.js",
|
"bin": "./bin/wordpos-cli.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"natural": "NaturalNode/natural",
|
"natural": "~0.1",
|
||||||
"underscore": ">=1.3.1",
|
"underscore": ">=1.3.1",
|
||||||
"WNdb": "latest",
|
"wordnet-db": "latest",
|
||||||
"commander": "1.1.1"
|
"commander": "1.1.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -24,6 +24,8 @@
|
||||||
},
|
},
|
||||||
"main": "./src/wordpos.js",
|
"main": "./src/wordpos.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "node tools/stat.js --no-stats index.adv index.adj index.verb index.noun"
|
"postinstall": "node tools/stat.js --no-stats index.adv index.adj index.verb index.noun",
|
||||||
}
|
"test": "jasmine-node spec/wordpos_spec.js spec/validate_spec.js --verbose"
|
||||||
|
},
|
||||||
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ var _ = require('underscore')._,
|
||||||
WordNet = natural.WordNet,
|
WordNet = natural.WordNet,
|
||||||
tokenizer = new natural.WordTokenizer(),
|
tokenizer = new natural.WordTokenizer(),
|
||||||
natural_stopwords = makeStopwordString(natural.stopwords),
|
natural_stopwords = makeStopwordString(natural.stopwords),
|
||||||
WNdb = require('WNdb'),
|
WNdb = require('wordnet-db'),
|
||||||
fastIndex = null;
|
fastIndex = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue