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-eng-lite-web-model

v1.8.1

Published

Wink's English Language Light Web Model for Web Browsers

Downloads

52,546

Readme

wink-eng-lite-web-model

winkNLP's English lite language model for Web Browsers

This is a pre-trained English language model for the winkjs NLP package — winkNLP. It is compatible with browserify — easily create a bundle that you can serve up to the web browser in a single <script> tag or even build a mobile apps. Its gzipped size is ~1MB.

It is an open-source language model, released under the MIT license.

It contains models for the following NLP tasks:

  1. Tokenization
  2. Token's Feature Extraction
  3. Sentence Boundary Detection
  4. Negation Handling
  5. POS tagging
  6. Automatic mapping of British spellings to American
  7. Named Entity Recognition
  8. Sentiment Analysis
  9. Custom Entities Definition
  10. Stemming using Porter Stemmer Algorithm V2
  11. Lemmatization
  12. Readability statistics computation

It is a derivative of wink-eng-lite-model and also supports Typescript.

Getting Started

Prerequisite

It requires Node.js version 16.0.0 or above. The compatible browsers are listed here.

Installation

The model must be installed along with the wink-nlp:

# Install wink-nlp
npm install wink-nlp --save
# Install wink-eng-lite-web-model
npm install wink-eng-lite-web-model --save

Example

We start by requiring the wink-nlp package and the wink-eng-lite-web-model. Then we instantiate wink-nlp using the language model:

// Load "wink-nlp" package.
const winkNLP = require('wink-nlp');
// Load english language model — light version.
const model = require('wink-eng-lite-web-model');
// Instantiate wink-nlp.
const nlp = winkNLP(model);

// Code for Hello World!
var text = 'Hello   World!';
var doc = nlp.readDoc(text);
console.log(doc.out());
// -> Hello   World!

Documentation

Learn how to use this model with winkNLP from the following resources:

  • Overview — introduction to winkNLP.
  • Concepts — everything you need to know to get started.
  • API Reference — explains usage of APIs with examples.

About model

The model supports following NLP tasks — tokenization, sentence boundary detection, negation handling, sentiment analysis, part-of-speech tagging, and named entity extraction.

Tokenization

While it is trained to process English language text, it can tokenize text containing other languages such as Hindi, French and German. Such tokens are tagged as X (foreign word) during pos tagging.

POS Tagging

The model follows the Universal POS tags standards. It delivers an accuracy of ~95% on a subset of WSJ corpus — this includes tokenization of raw text prior to pos tagging.

Named Entity Recognition (NER)

The model is trained to detect CARDINAL, DATE, DURATION, EMAIL, EMOJI, EMOTICON, HASHTAG, MENTION, MONEY, ORDINAL, PERCENT, TIME, and URL.

Sentiment Analysis

It delivers a f-score of ~84.5%, when validated using Amazon Product Review Sentiment Labelled Sentences Data Set at UCI Machine Learning Repository.

Storage Structure

The model is contained in the standard JSON format. Apart from the data, there is a tiny fraction of JS glue code, which is primarily used during model loading.

Need Help?

If you spot a bug and the same has not yet been reported, raise a new issue.

About wink

Wink is a family of open source packages for Natural Language Processing, Machine Learning and Statistical Analysis 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

The wink-eng-lite-web-model is copyright 2020-24 of GRAYPE Systems Private Limited.

It is licensed under the terms of the MIT License.