# node-tagger

> Node Web Service to tag Part Of Speech (POS)

Latest version **0.0.11** (published 2013-05-19) · 0 weekly downloads

## Install

```sh
npm install node-tagger
pnpm add node-tagger
yarn add node-tagger
bun add node-tagger
```

Provides the command `tagger`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.11 |
| Published | 2013-05-19 |
| First published | 2013-04-25 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.0 < 0.11.0 |
| Dependencies | 6 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Henri Bouvier |
| Maintainers | hbouvier |
| Keywords | POS, tagger, Part Of Speech |

## Links

- npm: https://www.npmjs.com/package/node-tagger
- Repository: https://github.com/hbouvier/node-tagger
- npm.io page: https://npm.io/package/node-tagger

## Dependencies (6)

- [pos](https://npm.io/package/pos.md) 0.1.2
- [express](https://npm.io/package/express.md) >= 3.2.0 < 4.0.0
- [winston](https://npm.io/package/winston.md) *
- [node-engine](https://npm.io/package/node-engine.md) latest
- [node-options](https://npm.io/package/node-options.md) >= 0.0.2
- [node-network-monitor](https://npm.io/package/node-network-monitor.md) latest

## Recent versions

- 0.0.11 (latest) — 2013-05-19
- 0.0.10 — 2013-04-25
- 0.0.9 — 2013-04-25
- 0.0.8 — 2013-04-25

## README

# Part Of Speech (POS) Tagger Web Service

This module is a command line wrapper around the npm module "pos". With it you
can use the POS tagger from the command line or start it as a REST Web Service.

The "pos" module  is maintained by Fortnight Labs.

#LICENSE:

node-tagger is licensed under the GNU LGPLv3


# Installation

npm install -g node-tagger

# Usage on the command line

tagger Hello world

# Usage as a Web Service

## Start the service
tagger --port=3000 &

1. To use only the lexer
> curl -X POST -H "Content-Type: application/json" -d '{"phrase":"Hello worldd"}' http://localhost:3000/ws/lex/phrase

2. To use the tagger on the result from the lexer
> curl -X POST -H "Content-Type: application/json" -d '{"words":["hello","world"]}' http://localhost:3000/ws/tag/words

3. To combine the lexer and the tagger in one request
> curl -X POST -H "Content-Type: application/json" -d '{"phrase":"hello world"}' http://localhost:3000/ws/tag/phrase

### You can also use the HTML User Interface

> http://localhost:3000/

# Include this as a module in your own project

    var tagger  = require('node-tagger'),
        express = require('express'),
        app     = express();
    
    // Lex the phrase, then Tag it.
    console.log('Hello World = ', tagger.api.tag(tagger.api.lex('Hello World')));
    
    ////////////////////////////////////////////////////////////////////////
    //
    // Express configuration for ALL environment
    //
    app.configure(function () {
        app.use(express.bodyParser());
        app.use(express.errorHandler());
    });
    
    // USE: curl -X POST -H "Content-Type: application/json" -d '{"phrase":"hello world"}' http://localhost:3000/tag/phrase
    app.post('/lex', tagger.rest.lexPhrase);
    app.post('/tag/phrase', tagger.rest.tagPhrase);
    app.post('/tag/words', tagger.rest.tagWords);
    
    app.listen(process.env.PORT || 3000);
    console.log('Listening|port=' + (process.env.PORT || 3000));

# To run the tests

    npm test

# To deploy on Heroku

Make sure you have an account and the "heroku" command line tools installed.
This project already has a Procfile for heroku, the only left is to
replace __MyPersonalTaggerService__ by the name you will chose for your service.

    heroku create --stack cedar __MyPersonalTaggerService__
    git push heroku master

Then open your browser at http://__MyPersonalTaggerService__.herokuapp.com/

---
_Source: https://npm.io/package/node-tagger · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
