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

intent-parser

v1.0.10

Published

A basic intent parser designed for Project Abigail.

Downloads

10

Readme

:interrobang::bangbang: Intent parser Build Status

An intent parser designed for Project Abigail.

Philosophy

This intent parser uses pattern matching. The parsing operates in 3 different stages:

  • Cleaning
  • Parsing
  • Refining

All of these stages are promises based to make it possible to handle asynchronous code, although at the moment all the code is synchronous.

Cleaning

In order to ease the writing of new patterns, a cleaning step takes place. It aims at reducing the complexity of sentences while preserving their meanings.

Consider the following phrases:

Hey, can you please let me know when am I free?
Can you please let me know when I'm free?
Please let me know when I'm free.

They all can be simplified to:

Let me know when I am free.

It becomes easier to write new patterns without worrying about supporting things like contractions (I'm and I am). Only the full forms (I am) are retained and should be used in patterns.

Parsing

The parsing and refining philosophy was inspired by Chrono.

The parsing attempts to identify semantical components of the phrase. Several passes are applied successively. Each of these passes have a single focus and try to extract things like temporal notions, people or actions.

During that phase the logic is kept to a minimum.

Refining

The refining phase attempts to make sense out of the elements extracted during the parsing.

If a person, a time and an action were extracted from a sentence, it is probably a request for creating a new reminder.

On the other hand, if only a person and a time were extracted and the input looks like a question then it is likely a query about someone's activity.

Build

$ npm run build

Unit tests

$ npm test