wordnet-noundatamap.min

0.1.4 • Public • Published

wordnet-noundatamap.min

NPM

Get noun data of WordNet as map (browserified, minified).

Use wordnet-noundatamap, if minification is not needed.

const nounDataMap = require('wordnet-noundatamap.min');
// nounDataMap [Map]
// {synset_offset => {lex_filenum(l), ss_type(s), w_cnt, words(w), p_cnt, pointers(p), gloss(g)}}
// {words(w): {word(w), lex_id(l)}}
// {pointers(p): {pointer_symbol(o), synset_offset(y), pos(p), source(s), target(t)}}

nounDataMap.get(1740);
// { l: 3,
//   s: 'n',
//   w: [ { w: 'entity', l: 0 } ],
//   p:
//    [ { o: '~', y: 1930, p: 'n', s: 0, t: 0 },
//      { o: '~', y: 2137, p: 'n', s: 0, t: 0 },
//      { o: '~', y: 4431553, p: 'n', s: 0, t: 0 } ],
//   g: 'that which is perceived or known or inferred to have its own distinct existence (living or nonliving)' }
nounDataMap.get(1930);
// { l: 3,
//   s: 'n',
//   w: [ { w: 'physical_entity', l: 0 } ],
//   p:
//    [ { o: '@', y: 1740, p: 'n', s: 0, t: 0 },
//      { o: '~', y: 2452, p: 'n', s: 0, t: 0 },
//      { o: '~', y: 2684, p: 'n', s: 0, t: 0 },
//      { o: '~', y: 7347, p: 'n', s: 0, t: 0 },
//      { o: '~', y: 21007, p: 'n', s: 0, t: 0 },
//      { o: '~', y: 29976, p: 'n', s: 0, t: 0 },
//      { o: '~', y: 14604577, p: 'n', s: 0, t: 0 } ],
//   g: 'an entity that has physical existence' }
nounDataMap.get(15325294);
// { l: 28,
//   s: 'n',
//   w:
//    [ { w: '9/11', l: 0 },
//      { w: '9-11', l: 0 },
//      { w: 'September_11', l: 0 },
//      { w: 'Sept._11', l: 0 },
//      { w: 'Sep_11', l: 0 } ],
//   p:
//    [ { o: '#p', y: 15237535, p: 'n', s: 0, t: 0 },
//      { o: '@i', y: 1249244, p: 'n', s: 0, t: 0 },
//      { o: ';c', y: 761047, p: 'n', s: 0, t: 0 } ],
//   g: 'the day in 2001 when Arab suicide bombers hijacked United States airliners and used them as bombs' }

Readme

Keywords

Package Sidebar

Install

npm i wordnet-noundatamap.min

Weekly Downloads

1

Version

0.1.4

License

MIT

Last publish

Collaborators

  • wolfram77