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

fast-tag-pos

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-tag-pos

FastTag part of speech tagger implementation

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

POS build & test npm license min minzip

pos-js is a Javascript port of Mark Watson's FastTag Part of Speech Tagger which was itself based on Eric Brill's trained rule set and English lexicon. It also includes a basic lexer that can be used to extract words and other tokens from text strings. Originally this was written by Percy Wegmann and is available on Google code.

This fork adds TypeScript support to a fork made by Darius Kazemi which added Node.JS and npm support.

Demo

Click here to check demo or checkout samples and demo source.

Installation

npm install @devil7softwares/pos

(or)

yarn add @devil7softwares/pos

Usage

import { Lexer, Tagger, TagType } from '@devil7softwares/pos';

const lexer = new Lexer();
const tagger = new Tagger();

const words = lexer.lex('This is some sample text. This text can contain multiple sentences.');
const taggedWords = tagger.tag(words);

for (const [word, tag] of taggedWords) {
    console.log(word + ' /' + tag);
}

License

jspos is licensed under the GNU LGPLv3

Acknowledgements

Thanks to Mark Watson for writing FastTag, which served as the basis for jspos.

Tags

TagDescriptionExample
CCCoord Conjuncnand,but,or
CDCardinal numberone,two
DTDeterminerthe,some
EXExistential therethere
FWForeign Wordmon dieu
INPrepositionof,in,by
JJAdjectivebig
JJRAdj., comparativebigger
JJSAdj., superlativebiggest
LSList item marker1,One
MDModalcan,should
NNNoun, sing. or massdog
NNPProper noun, sing.Edinburgh
NNPSProper noun, pluralSmiths
NNSNoun, pluraldogs
POSPossessive ending's
PDTPredeterminerall, both
PRP$Possessive pronounmy,one's
PRPPersonal pronounI,you,she
RBAdverbquickly
RBRAdverb, comparativefaster
RBSAdverb, superlativefastest
RPParticleup,off
SYMSymbol+,%,&
TO'to'to
UHInterjectionoh, oops
VBverb, base formeat
VBDverb, past tenseate
VBGverb, gerundeating
VBNverb, past parteaten
VBPVerb, presenteat
VBZVerb, presenteats
WDTWh-determinerwhich,that
WPWh pronounwho,what
WP$Possessive-Whwhose
WRBWh-adverbhow,where
,Comma,
.Sent-final punct. ! ?
:Mid-sent punct.: ; Ñ
$Dollar sign$
#Pound sign#
"quote"
(Left paren(
)Right paren)

See TagTypes.ts

Keywords

FAQs

Package last updated on 15 Mar 2022

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