updated readme

This commit is contained in:
moos 2012-05-07 00:39:57 -07:00
parent 4fae2f989c
commit 5f7a72cf44
2 changed files with 11 additions and 13 deletions

2
.npmignore Normal file
View File

@ -0,0 +1,2 @@
node_modules
.project

View File

@ -9,7 +9,7 @@ Usage
------- -------
```js ```js
var WordPOS = require('./wordpos'), var WordPOS = require('wordpos'),
wordpos = new WordPOS(); wordpos = new WordPOS();
wordpos.getAdjectives('The angry bear chased the frightened little squirrel.', function(result){ wordpos.getAdjectives('The angry bear chased the frightened little squirrel.', function(result){
@ -28,21 +28,15 @@ See `wordpos_spec.js` for full usage.
Installation Installation
------------ ------------
Get the script `wordpos.js` and use it. (npm package may be coming.) npm install wordpos
or use a git path in your package.json dependencies:
```
...
"dependencies": {
"wordpos": "git://github.com/moos/wordpos.git"
},
...
```
As of version 0.1.1, WordNet DB files are obtained off-line through dependency provided by [WNdb](https://github.com/moos/WNdb) module.
Note: `wordpos-bench.js` requires a [forked uubench](https://github.com/moos/uubench) module. Note: `wordpos-bench.js` requires a [forked uubench](https://github.com/moos/uubench) module.
To run spec:
npm install jasmine-node -g
jasmine-node wordpos_spec.js --verbose
API API
------- -------
@ -190,6 +184,8 @@ wordpos.lookup('great', console.log);
Benchmark Benchmark
---------- ----------
node wordpos-bench.js
Generally slow as it requires loading and searching large WordNet index files. Generally slow as it requires loading and searching large WordNet index files.
Single word lookup: Single word lookup: