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

eat-wrapper

v1.0.1

Published

Wrapper functions for the Edinburgh Associative Thesaurus

Downloads

3

Readme

eat-wrapper

some helpful wrapper functions around the very helpful JSON port of the Edinburgh Associative Thesaurus by Darius Kazemi. See license thing way down below in the depths.

NPM js-standard-style Build Status

EXAMPLE

example basic output of the eat json, looking up the world 'aeroplane':

AEROPLANE: [ { FLY: '15' },
  { FLIGHT: '6' },
  ...
  ]

this module formats it to be more like this:

AEROPLANE: { FLY: 15,
  FLIGHT: 6,
  ...
}

API

If you pass a word that the EAT don't know about, it should hopefully return undefined, so deal with that.

var eatWrapper = require('eat-wrapper')() => invoke that thang, build that muscle

eatWrapper.random(word, weighted:true) => picks an associated word at random. if weighted is true (it is by default), then the randomness will be weighted by the values for each associated word. For example, in this instance: AEROPLANE [ { FLIGHT: '6' }, { PLANE: '3' }], flight would be twice as likely to be returned as plane if it is weighted, but they would have equal chances if it is not weighted.

eatWrapper.keys(word) => returns a list of words associated with the given word

eatWrapper.key(word) => returns the formatted json object of {associatedWord: value, ...} for that word

eatWrapper.eat => ginormous json of {WORD [{ASSOC-WORD: 'VALUE'}, ...]}

USAGE/IDEAS

  • Darius Kazemi notes that "It's a weird set of associations very particular to its time and place" which is Britain in the 70s. Could consider it a weirdly specific and janky word net? The thing itself has a "voice" already, can it be made to speak? Can this sort of thing be replicated for other times and spaces? (tags on things?)

  • make a markov chain guide/filter its output towards associated words/concepts?

  • take the eat object and use it to learn d3 or something (COOL)

License

The Edinburgh Associative Thesaurus dataset is public sector data available under an Open Government License. As such you are free to

  • copy, publish, distribute and transmit the Information;
  • adapt the Information;
  • exploit the Information commercially and non-commercially for example, by combining it with other Information, or by including it in your own product or application.

See the Open Government License for further detail.