0.2.4 • Published 6 years ago

wordnet.index v0.2.4

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

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()
0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.13

6 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

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