0.1.4 • Published 6 years ago

wordnet-verbdatamap.nogloss v0.1.4

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

wordnet-verbdatamap.nogloss

NPM

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

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

const verbDataMap = require('wordnet-verbdatamap.nogloss');
// verbDataMap [Map]
// {synset_offset => {lex_filenum, ss_type, w_cnt, words, p_cnt, pointers, f_cnt, frames}}
// {words: {word, lex_id}}
// {pointers: {pointer_symbol, synset_offset, pos, source, target}}
// {frames: {f_num, w_num}}

verbDataMap.get(1740);
// { lex_filenum: 29,
//   ss_type: 'v',
//   w_cnt: 4,
//   words:
//    [ { word: 'breathe', lex_id: 0 },
//      { word: 'take_a_breath', lex_id: 0 },
//      { word: 'respire', lex_id: 0 },
//      { word: 'suspire', lex_id: 3 } ],
//   p_cnt: 21,
//   pointers:
//    [ { pointer_symbol: '*',
//        synset_offset: 5041,
//        pos: 'v',
//        source: 0,
//        target: 0 },
//      { pointer_symbol: '*',
//        synset_offset: 4227,
//        pos: 'v',
//        source: 0,
//        target: 0 },
//      { pointer_symbol: '+',
//        synset_offset: 3121972,
//        pos: 'a',
//        source: 3,
//        target: 1 },
//      { pointer_symbol: '+',
//        synset_offset: 832852,
//        pos: 'n',
//        source: 3,
//        target: 3 },
//      { pointer_symbol: '+',
//        synset_offset: 4087945,
//        pos: 'n',
//        source: 3,
//        target: 1 },
//      { pointer_symbol: '+',
//        synset_offset: 4257960,
//        pos: 'n',
//        source: 1,
//        target: 5 },
//      { pointer_symbol: '+',
//        synset_offset: 832852,
//        pos: 'n',
//        source: 1,
//        target: 1 },
//      { pointer_symbol: '^',
//        synset_offset: 4227,
//        pos: 'v',
//        source: 1,
//        target: 3 },
//      { pointer_symbol: '^',
//        synset_offset: 5041,
//        pos: 'v',
//        source: 1,
//        target: 3 },
//      { pointer_symbol: '$',
//        synset_offset: 2325,
//        pos: 'v',
//        source: 0,
//        target: 0 },
//      { pointer_symbol: '$',
//        synset_offset: 2573,
//        pos: 'v',
//        source: 0,
//        target: 0 },
//      { pointer_symbol: '~',
//        synset_offset: 2573,
//        pos: 'v',
//        source: 0,
//        target: 0 },
//      { pointer_symbol: '~',
//        synset_offset: 2724,
//        pos: 'v',
//        source: 0,
//        target: 0 },
//      { pointer_symbol: '~',
//        synset_offset: 2942,
//        pos: 'v',
//        source: 0,
//        target: 0 },
//      { pointer_symbol: '~',
//        synset_offset: 3826,
//        pos: 'v',
//        source: 0,
//        target: 0 },
//      { pointer_symbol: '~',
//        synset_offset: 4032,
//        pos: 'v',
//        source: 0,
//        target: 0 },
//      { pointer_symbol: '~',
//        synset_offset: 4227,
//        pos: 'v',
//        source: 0,
//        target: 0 },
//      { pointer_symbol: '~',
//        synset_offset: 5041,
//        pos: 'v',
//        source: 0,
//        target: 0 },
//      { pointer_symbol: '~',
//        synset_offset: 6697,
//        pos: 'v',
//        source: 0,
//        target: 0 },
//      { pointer_symbol: '~',
//        synset_offset: 7328,
//        pos: 'v',
//        source: 0,
//        target: 0 },
//      { pointer_symbol: '~',
//        synset_offset: 17024,
//        pos: 'v',
//        source: 0,
//        target: 0 } ],
//   f_cnt: 2,
//   frames: [ { f_num: 2, w_num: 0 }, { f_num: 8, w_num: 0 } ] }
verbDataMap.get(2325);
// { lex_filenum: 29,
//   ss_type: 'v',
//   w_cnt: 1,
//   words: [ { word: 'respire', lex_id: 1 } ],
//   p_cnt: 5,
//   pointers:
//    [ { pointer_symbol: '$',
//        synset_offset: 1740,
//        pos: 'v',
//        source: 0,
//        target: 0 },
//      { pointer_symbol: '@',
//        synset_offset: 2112831,
//        pos: 'v',
//        source: 0,
//        target: 0 },
//      { pointer_symbol: '+',
//        synset_offset: 3121972,
//        pos: 'a',
//        source: 1,
//        target: 1 },
//      { pointer_symbol: '+',
//        synset_offset: 832852,
//        pos: 'n',
//        source: 1,
//        target: 3 },
//      { pointer_symbol: '+',
//        synset_offset: 832472,
//        pos: 'n',
//        source: 1,
//        target: 1 } ],
//   f_cnt: 1,
//   frames: [ { f_num: 2, w_num: 0 } ] }
verbDataMap.get(2778268);
// { lex_filenum: 43,
//   ss_type: 'v',
//   w_cnt: 1,
//   words: [ { word: 'deflagrate', lex_id: 0 } ],
//   p_cnt: 2,
//   pointers:
//    [ { pointer_symbol: '@',
//        synset_offset: 2768426,
//        pos: 'v',
//        source: 0,
//        target: 0 },
//      { pointer_symbol: '+',
//        synset_offset: 13471590,
//        pos: 'n',
//        source: 1,
//        target: 1 } ],
//   f_cnt: 2,
//   frames: [ { f_num: 8, w_num: 0 }, { f_num: 11, w_num: 0 } ] }
0.1.4

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago