wordnet-adverbdatamap

0.1.4 • Public • Published

wordnet-adverbdatamap

NPM

Get adverb data of WordNet as map.

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

const adverbDataMap = require('wordnet-adverbdatamap');
// adverbDataMap [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}}
 
adverbDataMap.get(1740);
// { lex_filenum: 2,
//   ss_type: 'r',
//   w_cnt: 2,
//   words:
//    [ { word: 'a_cappella', lex_id: 0 },
//      { word: 'a_capella', lex_id: 0 } ],
//   p_cnt: 2,
//   pointers:
//    [ { pointer_symbol: '\\',
//        synset_offset: 2260096,
//        pos: 'a',
//        source: 2,
//        target: 2 },
//      { pointer_symbol: '\\',
//        synset_offset: 2260096,
//        pos: 'a',
//        source: 1,
//        target: 1 } ],
//   gloss: 'without musical accompaniment; "they performed a cappella"  ' }
adverbDataMap.get(1885);
// { lex_filenum: 2,
//   ss_type: 'r',
//   w_cnt: 3,
//   words:
//    [ { word: 'AD', lex_id: 0 },
//      { word: 'A.D.', lex_id: 0 },
//      { word: 'anno_Domini', lex_id: 0 } ],
//   p_cnt: 0,
//   pointers: [],
//   gloss: 'in the Christian era; used before dates after the supposed year Christ was born; "in AD 200"  ' }
adverbDataMap.get(520033);
// { lex_filenum: 2,
//   ss_type: 'r',
//   w_cnt: 1,
//   words: [ { word: 'voluminously', lex_id: 0 } ],
//   p_cnt: 4,
//   pointers:
//    [ { pointer_symbol: '+',
//        synset_offset: 14877,
//        pos: 'a',
//        source: 1,
//        target: 2 },
//      { pointer_symbol: '+',
//        synset_offset: 1393834,
//        pos: 'a',
//        source: 1,
//        target: 1 },
//      { pointer_symbol: '\\',
//        synset_offset: 14877,
//        pos: 'a',
//        source: 1,
//        target: 2 },
//      { pointer_symbol: '\\',
//        synset_offset: 1393834,
//        pos: 'a',
//        source: 1,
//        target: 1 } ],
//   gloss: 'in a voluminous manner  ' }

Readme

Keywords

Package Sidebar

Install

npm i wordnet-adverbdatamap

Weekly Downloads

1

Version

0.1.4

License

MIT

Last publish

Collaborators

  • wolfram77