Socket
Socket
Sign inDemoInstall

en-lexicon

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

en-lexicon

Extensible english lexicon with Emoji support


Version published
Weekly downloads
3.8K
decreased by-7.54%
Maintainers
1
Weekly downloads
 
Created
Source

English Lexicon

Extensible English language lexicon for POS tagging with Emojis and around 110K words

Installation

npm install en-lexicon --save

Usage


const lexicon = require("en-lexicon");

console.log(lexicon.lexicon.faraway);
// "JJ"

// multiple POS tags are separated by "|"
console.log(lexicon.lexicon.acquired);
// "VBN|JJ|VBD"

Extending

One of the main reason that I had to write my own lexicon module is that I needed it to be extensible.

To extend the lexion with medical terms for example:

const lexicon = require("en-lexicon");
lexicon.extend({
	lactate:"VB",
	serum:"NN"
});

// Now that you've extended the lexicon with your own terms
// you won't only get the terms you entered
// The lexicon will (try) to be smart and
// apply some inflections on those terms

// the term you entered
console.log(lexicon.lexicon.lactate);
// "VB"
console.log(lexicon.lexicon.lactated);
// "VBD|VBN"
console.log(lexicon.lexicon.lactating);
// "VBG"

Credits

I've used Eric Brill's lexicon as starting point for this project, manually corrected some cases, and expanded it using various corpora, this one and this one for example.

License

License: The MIT License (MIT) - Copyright (c) 2017 Alex Corvi

Keywords

FAQs

Package last updated on 08 Apr 2017

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