Gets the token weight from either the training or the default config
Gets the token weight from either the training or the default config.
iex> SimpleBayes.Trainer.TokenWeight.from(weight: 2) 2 iex> SimpleBayes.Trainer.TokenWeight.from(other_opt: 2) 1 iex> SimpleBayes.Trainer.TokenWeight.from(nil) 1