wordnet.index
v0.2.4
Published
Search index for WordNet book.
Downloads
7
Readme
wordnet.index
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()