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

oxford-dictionaries-api

v0.1.2

Published

node module wrapper for oxford dictionaries api

Downloads

26

Readme

oxford-dictionaries-api

node module wrapper for Oxford dictionaries api v2

Install

npm install --save oxford-dictionaries-api

Usage

initial

Initialize an instance of the OxfordDictionaries class to use

// need app_id and app_key
const app_id = 'your_appid'
const app_key = 'your_appkey';

let oxford= require('oxford-dictionaries-api');
let oxforddictionaries = new oxford(app_id, app_key);

functions

Note: A lot of the key names for the functions' objects are taken from the oxford docs Here. I might not have updated this readme cause I probably would be working on other things. (I think the biggest thing that people would usually use is entries, which should get you the definition of words)

entries({ word_id, source_lang, fields, grammaticalFeatures, lexicalCategory, domains, registers, strictMatch })

function takes in an object with the following:

| Key | Type | Optional | About | Default | Example | | --- | --- | -- | --- | --- | --- | | word_id | String | No | The identifier for an Entry (case-sensitive). | Null | "ace" | | source_lang | String | Yes | Language code of the source language in a monolingual dataset. | "en-gb" | "en-gb" | | fields | Array[String] | Yes | A comma-separated list of data fields to return for the matched entries | Null | ["definitions", "domains"] | | grammaticalFeatures | Array[String] | Yes | A comma-separated list of grammatical features ids to match on (default: all features). | Null | ["Cardinal", "Ordinal"] | | lexicalCategory | Array[String] | Yes | A comma-separated list of lexical categories ids to match on (default: all categories). | Null | | | domains | Array[String] | Yes | A comma-separated list of domains ids to match on (default: all domains). | Null | | | registers | Array[String] | Yes | A comma-separated list of registers ids to match on (default: all registers). | Null | | | strictMatch | Boolean | Yes | Specifies whether diacritics must match exactly. | False | True |

Example:

oxforddictionaries.entries({word_id: 'ace'})
  .then((data) => console.log(data))
  .catch((e) => console.log('Error', e));

lemmas({ word_id, source_lang, grammaticalFeatures, lexicalCategory })

search({ source_lang, target_lang, q, prefix, limit, offset })

translation({ source_lang, target_lang, word_id, strictMatch })

thesaurus({ lang, word_id, fields, strictMatch })

sentences({ source_lang, word_id, strictMatch })

lexistats_ngrams({ source_lang, corpus, ngram_size, tokens, contains, format, minFrequency, maxFrequency, collate, sort, offset, limit })

lexistats_word({ source_lang, corpus, wordform, trueCase, lemma, lexicalCategory })

lexistats_words({ source_lang, corpus, wordform, trueCase, lemma, lexicalCategory, grammaticalFeatures, minFrequency, maxFrequency, minNormalizedFrequency, maxNormalizedFrequency, collate, sort, offset, limit })

domains({ source_lang, target_lang } = {})

fields({ endpoint } = {})

filters({ endpoint } = {})

grammaticalFeatures({ source_lang, target_lang } = {})

languages({ sourceLanguage, targetLanguage } = {})

lexicalcategories({ source_lang, target_lang } = {})

registers({ source_lang, target_lang } = {})