wordnet.index

0.2.4 • Public • Published

wordnet.index

NPM

Search index for WordNet book.

const Index = require('wordnet.index');
// Index([sense=[]], [type=[]], [name=[]])
// -> Index {<size>, <name>, <type>, <sense>}
 
// Get sense of nearest match.
// -> <id>
find(name, [type begin=0], [type end], [begin=0], [end])
 
// Get senses of all matches.
// -> <target>
findAll(name, [type begin=0], [type end], [begin=0], [end], [target=new Set()])
 
// Get index of first match.
// -> <first match index> | ~<closest match index>
findIndex(name, [type begin=0], [type end], [begin=0], [end])
 
// Get index of last match.
// -> <last match index> | ~<closest match index>
findLastIndex(name, [type begin=0], [type end], [begin=0], [end])
 
// Clear all.
// -> this
clear()
 
// Sort all,
// -> this
sort(names, types, [name func], [this])
 
// Set entry.
// -> this
set(name, type, sense)
 
// Add entry at index.
// -> 1
addAt(index, name, type, sense)
 
// Delete entries.
// -> <number of entries deleted>
delete(name, [type begin=0], [type end], [begin=0], [end])
 
// Delete entry at index.
// -> <length>
deleteAt(index, [length=1])
 
// Setup from JSON.
// -> this
fromJson(json)
 
// Get as JSON.
// -> <json>
toJson()

Readme

Keywords

Package Sidebar

Install

npm i wordnet.index

Weekly Downloads

1

Version

0.2.4

License

MIT

Unpacked Size

5.3 kB

Total Files

3

Last publish

Collaborators

  • wolfram77