- Vocabulary
- new Vocabulary(terms)
- .size :
number
- .terms :
Array
|Set
- .add(terms) ⇒
this
- .remove(terms) ⇒
this
- .has(term) ⇒
bool
- .indexOf(term) ⇒
number
Param | Type |
---|---|
terms | Array | Set |
Vocabulary size
Vocabulary terms
Add one or more terms to the vocabulary
Param | Type |
---|---|
terms | string | Array | Set |
Remove one or more terms from the vocabulary
Param | Type |
---|---|
terms | string | Array | Set |
Return whether the vocabulary contains a certain term
Param | Type |
---|---|
term | string |
Return the index of a term in the vocabulary (returns -1 if not found)
Param | Type |
---|---|
term | string |