wordnet.book

0.3.5 • Public • Published

wordnet.book

NPM

Defines WordNet dictionary loader.

For usage examples, see wordnetdictionary.

const Book = require('wordnet.book');
// Book([index], [table], [blob])
// -> Book {<index>, <table>, <blob>}
 
// Load prebuilt book data.
// -> this
fromJson(book data)
 
// Load data maps.
// -> this
fromDataMap(data map...)
 
// Build index, after loading data.
// - <name func>(<name>, <index>, <table>)
// -> this
buildIndex([name func], [this])
 
// Get as JSON.
// -> <json>
toJson([include index=false])
 
// Get name from id.
// -> <name> (if word) | null (if synset)
name(id)
 
// Get lex type from id.
// -> <lex type>
lexType(id)
 
// Get lex id from id.
// -> <lex id>
lexId(id)
 
// Get lex number from id.
// -> <lex number>
lexNumber(id)
 
// Get part of speech number from id.
// -> <pos number>
posNumber(id)
 
// Get part of speech symbol from id.
// -> <pos symbol>
posSymbol(id)
 
// Get part of speech name from id.
// -> <pos name>
posName(id)
 
// Get lex file number from id.
// -> <lex file number>
lexFileNumber(id)
 
// Get lex file name from id.
// -> <lex file name>
lexFileName(id)
 
// Get lex file content from id.
// -> <lex file content>
lexFileContent(id)
 
// Check if id is lemma.
// -> true | false
isLemma(id)
 
// Check if id is synset.
// -> true | false
isSynset(id)
 
// Get synset from id.
// -> <synset>
synset(id)
 
// Get lemmas of id.
// -> Bunch {<id>...}
lemmas(id, [target])
 
// Get pointers from id.
// -> Bunch {<id>...}
pointers(id, [kbegin=0], [kend=32], [direct=false], [target])
 
// Get pointer tree from id.
// -> Bunch {<id>...}
pointerTree(id, [kbegin=0], [kend=32], [direct=false], [target])
 
// Get frames from id.
// -> Set {<frame number>...}
frames(id, [direct=false], [target])
 
// Get frames text from id.
// -> Set {<frame text>...}
framesText(id, [direct=false], [target])
 
// Get gloss from id.
// -> <gloss>
gloss(id)
 
// Get definition from id.
// -> <definition>
definition(id)
 
// Get examples from id.
// -> Set {<example>...}
examples(id, [target])
 
// Get description from id.
// -> <description>
description(id, [hide lex file name=false], [hide lex id=false], [hide definition=false], [hide examples=false])
 
// Get synonyms from id.
// -> Bunch {<id>...}
synonyms(id, [target])
 
// Get similar to pointers from id.
// -> Bunch {<id>...}
similarTo(id, [target])
 
// Get verb group pointers from id.
// -> Bunch {<id>...}
verbGroup(id, [target])
 
// Get also see pointers from id.
// -> Bunch {<id>...}
alsoSee(id, [target])
 
// Get antonym pointers from id.
// -> Bunch {<id>...}
antonyms(id, [target])
 
// Get pertainym pointers from id.
// -> Bunch {<id>...}
pertainyms(id, [target])
 
// Get attribute pointers from id.
// -> Bunch {<id>...}
attributes(id, [target])
 
// Get cause pointers from id.
// -> Bunch {<id>...}
causes(id, [target])
 
// Get entailment pointers from id.
// -> Bunch {<id>...}
entailments(id, [target])
 
// Get derivationally related form pointers from id.
// -> Bunch {<id>...}
derivationallyRelatedForms(id, [target])
 
// Get participle of verb pointers from id.
// -> Bunch {<id>...}
participlesOfVerb(id, [target])
 
// Get hypernym pointers from id.
// -> Bunch {<id>...}
hypernyms(id, [target])
 
// Get hypernym tree pointers from id.
// -> Bunch {<id>...}
hypernymTree(id, [target])
 
// Get class hypernym pointers from id.
// -> Bunch {<id>...}
classHypernyms(id, [target])
 
// Get class hypernym tree pointers from id.
// -> Bunch {<id>...}
classHypernymTree(id, [target])
 
// Get instance hypernym pointers from id.
// -> Bunch {<id>...}
instanceHypernyms(id, [target])
 
// Get instance hypernym tree pointers from id.
// -> Bunch {<id>...}
instanceHypernymTree(id, [target])
 
// Get hyponym pointers from id.
// -> Bunch {<id>...}
hyponyms(id, [target])
 
// Get hyponym tree pointers from id.
// -> Bunch {<id>...}
hyponymTree(id, [target])
 
// Get class hyponym pointers from id.
// -> Bunch {<id>...}
classHyponyms(id, [target])
 
// Get class hyponym tree pointers from id.
// -> Bunch {<id>...}
classHyponymTree(id, [target])
 
// Get instance hyponym pointers from id.
// -> Bunch {<id>...}
instanceHyponyms(id, [target])
 
// Get instance hyponym tree pointers from id.
// -> Bunch {<id>...}
instanceHyponymTree(id, [target])
 
// Get holonym pointers from id.
// -> Bunch {<id>...}
holonyms(id, [target])
 
// Get member holonym pointers from id.
// -> Bunch {<id>...}
memberHolonyms(id, [target])
 
// Get substance holonym pointers from id.
// -> Bunch {<id>...}
substanceHolonyms(id, [target])
 
// Get part holonym pointers from id.
// -> Bunch {<id>...}
partHolonyms(id, [target])
 
// Get meronym pointers from id.
// -> Bunch {<id>...}
meronyms(id, [target])
 
// Get member meronym pointers from id.
// -> Bunch {<id>...}
memberMeronyms(id, [target])
 
// Get substance meronym pointers from id.
// -> Bunch {<id>...}
substanceMeronyms(id, [target])
 
// Get part meronym pointers from id.
// -> Bunch {<id>...}
partMeronyms(id, [target])
 
// Get domain of synset pointers from id.
// -> Bunch {<id>...}
domain(id, [target])
 
// Get domain of synset (topic) pointers from id.
// -> Bunch {<id>...}
topicDomain(id, [target])
 
// Get domain of synset (region) pointers from id.
// -> Bunch {<id>...}
regionDomain(id, [target])
 
// Get domain of synset (usage) pointers from id.
// -> Bunch {<id>...}
usageDomain(id, [target])
 
// Get member of this domain pointers from id.
// -> Bunch {<id>...}
domainMembers(id, [target])
 
// Get member of this domain (topic) pointers from id.
// -> Bunch {<id>...}
topicDomainMembers(id, [target])
 
// Get member of this domain (region) pointers from id
// -> Bunch {<id>...}
regionDomainMembers(id, [target])
 
// Get member of this domain (usage) pointers from id.
// -> Bunch {<id>...}
usageDomainMembers(id, [target])

Readme

Keywords

Package Sidebar

Install

npm i wordnet.book

Weekly Downloads

34

Version

0.3.5

License

MIT

Unpacked Size

20.7 kB

Total Files

3

Last publish

Collaborators

  • wolfram77