wordnet-noundatamap

0.1.4 • Public • Published

wordnet-noundatamap

NPM

Get noun data of WordNet as map.

Use wordnet-noundatamap.nogloss, if gloss is not needed.
Use wordnet-noundatamap.min, if minification is needed.

const nounDataMap = require('wordnet-noundatamap');
// nounDataMap [Map]
// {synset_offset => {lex_filenum, ss_type, w_cnt, words, p_cnt, pointers, gloss}}
// {words: {word, lex_id}}
// {pointers: {pointer_symbol, synset_offset, pos, source, target}}

nounDataMap.get(1740);
// { lex_filenum: 3,
// ss_type: 'n',
// w_cnt: 1,
// words: [ { word: 'entity', lex_id: 0 } ],
// p_cnt: 3,
// pointers:
//   [ { pointer_symbol: '~',
//       synset_offset: 1930,
//       pos: 'n',
//       source: 0,
//       target: 0 },
//     { pointer_symbol: '~',
//       synset_offset: 2137,
//       pos: 'n',
//       source: 0,
//       target: 0 },
//     { pointer_symbol: '~',
//       synset_offset: 4431553,
//       pos: 'n',
//       source: 0,
//       target: 0 } ],
// gloss: 'that which is perceived or known or inferred to have its own distinct existence (living or nonliving)' }
nounDataMap.get(1930);
// { lex_filenum: 3,
// ss_type: 'n',
// w_cnt: 1,
// words: [ { word: 'physical_entity', lex_id: 0 } ],
// p_cnt: 7,
// pointers:
//   [ { pointer_symbol: '@',
//       synset_offset: 1740,
//       pos: 'n',
//       source: 0,
//       target: 0 },
//     { pointer_symbol: '~',
//       synset_offset: 2452,
//       pos: 'n',
//       source: 0,
//       target: 0 },
//     { pointer_symbol: '~',
//       synset_offset: 2684,
//       pos: 'n',
//       source: 0,
//       target: 0 },
//     { pointer_symbol: '~',
//       synset_offset: 7347,
//       pos: 'n',
//       source: 0,
//       target: 0 },
//     { pointer_symbol: '~',
//       synset_offset: 21007,
//       pos: 'n',
//       source: 0,
//       target: 0 },
//     { pointer_symbol: '~',
//       synset_offset: 29976,
//       pos: 'n',
//       source: 0,
//       target: 0 },
//     { pointer_symbol: '~',
//       synset_offset: 14604577,
//       pos: 'n',
//       source: 0,
//       target: 0 } ],
// gloss: 'an entity that has physical existence' }
nounDataMap.get(15325294);
// { lex_filenum: 28,
// ss_type: 'n',
// w_cnt: 5,
// words:
//   [ { word: '9/11', lex_id: 0 },
//     { word: '9-11', lex_id: 0 },
//     { word: 'September_11', lex_id: 0 },
//     { word: 'Sept._11', lex_id: 0 },
//     { word: 'Sep_11', lex_id: 0 } ],
// p_cnt: 3,
// pointers:
//   [ { pointer_symbol: '#p',
//       synset_offset: 15237535,
//       pos: 'n',
//       source: 0,
//       target: 0 },
//     { pointer_symbol: '@i',
//       synset_offset: 1249244,
//       pos: 'n',
//       source: 0,
//       target: 0 },
//     { pointer_symbol: ';c',
//       synset_offset: 761047,
//       pos: 'n',
//       source: 0,
//       target: 0 } ],
// gloss: 'the day in 2001 when Arab suicide bombers hijacked United States airliners and used them as bombs' }

Dependents (0)

Package Sidebar

Install

npm i wordnet-noundatamap

Weekly Downloads

0

Version

0.1.4

License

MIT

Last publish

Collaborators

  • wolfram77