Node Stanford POS-tagger
A node.js client to interact with Stanford's POS-tagger.
node-stanford-postagger has one usage, to interact with Stanford's POS-tagger.
git clone https://github.com/cuzzo/node-stanford-postaggercd node-stanford-postaggernpm install
How to POS-tag
util/run-server.sh is a script that runs Turian's XMLRPC service for Stanford's POS-tagger in a user-friendly way.
run-server.sh models/left3words-wsj-0-18.tagger 9000
The above runs the service using the built-in
left3words-wsj-0-18 training model on port
9000. To run this script, it's required to live in the root directory of the stanford-postagger code--in the same directory as Turian's
tagger-server.jar is required to be moved.
Once the server is running, you can run:
bin/tag "Hello, world!"
You'll get back:
[ 'Hello_UH ,_, world_NN !_.\n' ]
Interacting with Stanford's POS-tagger in Your node.js Project
var Tagger = Tagger;var tagger =port: "9000"host: "localhost";tagger;
If you don't like callbacks and prefer promises, node-stanford-postagger supports
var Q = ;var Tagger = Tagger;var tagger =port: "9000"host: "localhost";tagger;tagger;
- Ali Afshar's XMLRPC service for Stanford's POS-tagger - This node.js client wouldn't exist without it.
- The geniuses at Stanford - These guys were and are truly pioneering. This software gets the part of speech right 90% of the time, even when the word is unknown!
node-stanford-postagger is free--as in BSD. Hack your heart out, hackers.