npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wink-pos-tagger

v2.2.2

Published

English Part-of-speech (POS) tagger

Downloads

4,661

Readme

wink-pos-tagger

English Part-of-speech (POS) tagger

Build Status Coverage Status Inline docs dependencies Status devDependencies Status Gitter

Perform part-of-speech tagging of english sentences using wink-pos-tagger. It is based on transformation based learning (TBL) approach pioneered by Eric Brill.

Optimized for performance, it pos-tags and lemmatizes over 525,000 tokens per second with an accuracy of 93.2% on the standard WSJ22-24 test set. This was benchmarked on 2.2 GHz Intel Core i7 machine with 16GB RAM using its tagRawTokens() API.

Installation

Use npm to install:

npm install wink-pos-tagger --save

Getting Started

The code below illustrates the steps required to pos tag a sentence:

// Load wink-pos-tagger.
var posTagger = require( 'wink-pos-tagger' );

// Create an instance of the pos tagger.
var tagger = posTagger();

// Tag the sentence using the tag sentence api.
tagger.tagSentence( 'He is trying to fish for fish in the lake.' );
// -> [ { value: 'He', tag: 'word', normal: 'he', pos: 'PRP' },
//      { value: 'is', tag: 'word', normal: 'is', pos: 'VBZ', lemma: 'be' },
//      { value: 'trying', tag: 'word', normal: 'trying', pos: 'VBG', lemma: 'try' },
//      { value: 'to', tag: 'word', normal: 'to', pos: 'TO' },
//      { value: 'fish', tag: 'word', normal: 'fish', pos: 'VB', lemma: 'fish' },
//      { value: 'for', tag: 'word', normal: 'for', pos: 'IN' },
//      { value: 'fish', tag: 'word', normal: 'fish', pos: 'NN', lemma: 'fish' },
//      { value: 'in', tag: 'word', normal: 'in', pos: 'IN' },
//      { value: 'the', tag: 'word', normal: 'the', pos: 'DT' },
//      { value: 'lake', tag: 'word', normal: 'lake', pos: 'NN', lemma: 'lake' },
//      { value: '.', tag: 'punctuation', normal: '.', pos: '.' } ]

Notice the way instances of the word "fish" have been tagged as verb and noun.

Documentation

Check out the pos tagger API documentation to learn more.

Need Help?

If you spot a bug and the same has not yet been reported, raise a new issue or consider fixing it and sending a pull request.

About wink

Wink is a family of open source packages for Statistical Analysis, Natural Language Processing and Machine Learning in NodeJS. The code is thoroughly documented for easy human comprehension and has a test coverage of ~100% for reliability to build production grade solutions.

Copyright & License

wink-pos-tagger is copyright 2017-19 GRAYPE Systems Private Limited.

It is licensed under the terms of the MIT License.