LM
LM
ptrget or set a pointer to a (*)LMWrapper.
new()LM$new()NULL
start()LM$start(startWithNothing)startWithNothinga logical value indicating whether the state should be initialized with a start-of-sequence marker.
An LMState object representing the current state.
score()LM$score(state, usrTokenIdx)stateAn LMState object representing the current state.
usrTokenIdxAn integer representing the index of the current token in the user-defined token list.
A list containing the externalpointer to the updated LMState object and a numeric value representing the score.
finish()LM$finish(state)stateAn LMState object representing the current state.
A list containing the updated LMState object and a numeric value representing the final score.
clone()The objects of this class are cloneable with this method.
LM$clone(deep = FALSE)deepWhether to make a deep clone.