Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

retext-pos

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

retext-pos

Retext POS (part-of-speech) tagger

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

retext-pos Build Status Coverage Status

browser support


Retext POS (part-of-speech) tagger using dariusk/pos-js.

Installation

NPM:

$ npm install retext-pos

Component.js:

$ component install wooorm/retext-pos

Usage

var Retext = require('retext'),
    visit = require('retext-visit'),
    pos = require('retext-pos');

var root = new Retext()
    .use(visit)
    .use(pos)
    .parse('I went to the store, to buy 5.2 gallons of milk.');

root.visitType(root.WORD_NODE, function (node) {
    console.log(node.toString(), node.data.partOfSpeech);
});
// 'I', 'NN'
// 'went', 'VBD'
// 'to', 'TO'
// 'the', 'DT'
// 'store', 'NN'
// 'to', 'TO'
// 'buy', 'VB'
// '5.2', 'CD'
// 'gallons', 'NNS'
// 'of', 'IN'
// 'milk', 'NN'

The example also uses retext-visit.

API

None, the plugin automatically detects the part-of-speech tag of each word (using dariusk/pos-js) when it’s created or changed, and stores the tag in wordNode.data.partOfSpeech.

License

MIT

Keywords

FAQs

Package last updated on 31 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc