- Model
- new Model([config])
- .nGramMin :
int - .nGramMax :
int - .vocabulary :
Vocabulary|false - .data :
Object - .serialize() ⇒
Object
| Param | Type | Default | Description |
|---|---|---|---|
| [config] | Object |
||
| [config.nGramMin] | int |
1 |
Minimum n-gram size |
| [config.nGramMax] | int |
1 |
Maximum n-gram size |
| [config.vocabulary] | Array | Set | false |
[] |
Terms mapped to indexes in the model data entries, set to false to store terms directly in the data entries |
| [config.data] | Object |
{} |
Key-value store containing all training data |
Minimum n-gram size
Maximum n-gram size
Vocabulary instance
Model data
Return the model in its current state an an object literal, including the configured n-gram min/max values, the vocabulary as an array (if any, otherwise false), and an object literal with all the training data