wordnet-noundatamap.nogloss

0.1.4 • Public • Published

wordnet-noundatamap.nogloss

NPM

Get noun data of WordNet as map (without gloss).

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

const nounDataMap = require('wordnet-noundatamap.nogloss');
// nounDataMap [Map]
// {synset_offset => {lex_filenum, ss_type, w_cnt, words, p_cnt, pointers}}
// {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 } ] }
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 } ] }
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 } ] }

Package Sidebar

Install

npm i wordnet-noundatamap.nogloss

Weekly Downloads

1

Version

0.1.4

License

MIT

Last publish

Collaborators

  • wolfram77