Skip to content

Latest commit

 

History

History
55 lines (35 loc) · 2.17 KB

Model.md

File metadata and controls

55 lines (35 loc) · 2.17 KB

Model

new Model([config])

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

model.nGramMin : int

Minimum n-gram size

model.nGramMax : int

Maximum n-gram size

model.vocabulary : Vocabulary | false

Vocabulary instance

model.data : Object

Model data

model.serialize() ⇒ Object

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