wordnet-adjectivedatamap.nogloss

0.1.4 • Public • Published

wordnet-adjectivedatamap.nogloss

NPM

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

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

const adjectiveDataMap = require('wordnet-adjectivedatamap.nogloss');
// adjectiveDataMap [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}}

adjectiveDataMap.get(1740);
// { lex_filenum: 0,
//   ss_type: 'a',
//   w_cnt: 1,
//   words: [ { word: 'able', lex_id: 0 } ],
//   p_cnt: 5,
//   pointers:
//    [ { pointer_symbol: '=',
//        synset_offset: 5207437,
//        pos: 'n',
//        source: 0,
//        target: 0 },
//      { pointer_symbol: '=',
//        synset_offset: 5624029,
//        pos: 'n',
//        source: 0,
//        target: 0 },
//      { pointer_symbol: '+',
//        synset_offset: 5624029,
//        pos: 'n',
//        source: 1,
//        target: 1 },
//      { pointer_symbol: '+',
//        synset_offset: 5207437,
//        pos: 'n',
//        source: 1,
//        target: 1 },
//      { pointer_symbol: '!',
//        synset_offset: 2098,
//        pos: 'a',
//        source: 1,
//        target: 1 } ] }
adjectiveDataMap.get(2098);
// { lex_filenum: 0,
//   ss_type: 'a',
//   w_cnt: 1,
//   words: [ { word: 'unable', lex_id: 0 } ],
//   p_cnt: 2,
//   pointers:
//    [ { pointer_symbol: '=',
//        synset_offset: 5207437,
//        pos: 'n',
//        source: 0,
//        target: 0 },
//      { pointer_symbol: '!',
//        synset_offset: 1740,
//        pos: 'a',
//        source: 1,
//        target: 1 } ] }
adjectiveDataMap.get(3167317);
// { lex_filenum: 44,
//   ss_type: 'a',
//   w_cnt: 1,
//   words: [ { word: 'unsaponified', lex_id: 0 } ],
//   p_cnt: 2,
//   pointers:
//    [ { pointer_symbol: '!',
//        synset_offset: 3167204,
//        pos: 'a',
//        source: 1,
//        target: 1 },
//      { pointer_symbol: '<',
//        synset_offset: 539651,
//        pos: 'v',
//        source: 1,
//        target: 1 } ] }

Package Sidebar

Install

npm i wordnet-adjectivedatamap.nogloss

Weekly Downloads

1

Version

0.1.4

License

MIT

Last publish

Collaborators

  • wolfram77