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

en-parse

v1.1.7

Published

English language syntactic dependency parser

Downloads

70

Readme

English Parse

English language syntactic dependency parser.

important This project is in a very early stage, it's rather an experiment than a real a project. Using it in production may hurt your feelings.

Installation and Usage

npm i --save en-parse
const parser = require("en-parse").default;
let parsed = parser(["PRP","VBP","TO","VBP"],["i","like","to","parse"]);

NOTE: tokens should be normalized (contractions, abbreviations and such all resolved to it's normal form).

The parsed variable is now an array like this one:

[
  {
    "label": "MWE",
    "type": "NP",
    "master": 1
  },
  {
    "label": "NSUBJ",
    "type": "NP",
    "master": 2
  },
  {
    "label": "ROOT",
    "type": "VP",
    "master": -1
  },
  {
    "label": "COMPMARK",
    "type": "PP",
    "master": 5
  },
  {
    "label": "NSUBJ",
    "type": "NP",
    "master": 5
  },
  {
    "label": "XCOMP",
    "type": "VP",
    "master": 2
  },
  {
    "label": "ADVMOD",
    "type": "ADV",
    "master": 8
  },
  {
    "label": "AUX",
    "type": "VBN",
    "master": 8
  },
  {
    "label": "ADVCL",
    "type": "VP",
    "master": 5
  },
  {
    "label": "PUNCT",
    "type": "PUNCT",
    "master": 2
  }
]

Annotation Specs:

Core Nominal Arguments

Annotation | Name | Example --- | --- | --- NSUBJ | Nominal Subject | I like you DOBJ | Direct Object | I like you IOBJ | Indirect Object | she gave me a book NSUBJPASS | Nominal Subject (passive) | I have been given a chance CCOMP | Clausal Complement | The boss ordered to dig the hole XCOMP | Open Clausal Complement | The boss told us to dig OBL | Oblique Object | Give the toys to the children EXPL | Expletive | I have been there ADVCL | Adverb Clause Modifier | We were walking as the rain was falling ADVMOD | Adverbial modifier | I don't eat genetically modified food. DISCOURSE | Discourse | I like that :) VPRT | Verbal Particle | I switched the TV off AUX | Auxiliary | I am going to buy a new computer AUXPASS | Auxiliary (passive) | I have been marked COMPMARK | Complement Marker | I will do it if I like it ADVMARK | Adverb Marker | I did it after I was convinced NOMD | Nominal Modifier | MSNBC news had little effect on the market NUMMOD | Numeric Modifier | I ate 2 eggs this morning ACL | Clausal Modifier of a Noun | I saw the man you love AMOD | Adjectival Modifier | you were good to him DET | Determiner | which book you prefer? CASE | Case Marking | I went to Rachel PUNCT | Punctuation | Guys, keep calm! CC | Coordinating Conjunction | Mathew and Alex INTERJ | Interjection | Pass me the sugar, please EXT | Extension | My name is Alex Corvi DEP | Unrecognized dependency | how what

Why?

  • Current solutions uses statistical machine learning models which makes it 5 times slower (if not worse) than a rule based implementation like this one.
  • This is a javascript implementation, so it can be used for an in-browser natural language processing.
  • Also because it's written in javascript it might be preferred in smart bots to reduce the complexity of having your bot written in node.js and the natural language processor written in Python or C++.

Credits

The idea of this parser was originally featured as a small experiment in Xav Ulflander's Compendium.