Xerp::Vectors::Trainer
Coordinates token vector training for semantic expansion. v0.2 uses co-occurrence based vectors with two models:
- cooc.line.v1: linear sliding-window co-occurrence (textual proximity)
- cooc.scope.v1: level-based isolation (structural siblings)
Constructors
new(config : Config)
SourceInstance methods
Clears vector training data. If model is nil, clears all models. Otherwise clears the specified model.
Returns training metadata for a specific model, or nil if not trained.
train(model : String | Nil = nil, window_size : Int32 = Cooccurrence::DEFAULT_WINDOW_SIZE, min_count : Int32 = Cooccurrence::DEFAULT_MIN_COUNT, top_neighbors : Int32 = Cooccurrence::DEFAULT_TOP_NEIGHBORS) : MultiModelTrainStats
Trains token vectors using co-occurrence method. If model is nil, trains both models. Otherwise trains the specified model.