public static interface LanguageModel.Dynamic extends Compilable, LanguageModel, ObjectHandler<CharSequence>
LanguageModel.Dynamic accepts training events in
the form of character slices or sequences. A dynamic language
model should also implement either the LanguageModel.Process interface or the LanguageModel.Sequence interface.
Optionally, a dynamic language model will implement the
Compilable.compileTo(ObjectOutput) method to write a compiled
version of the dynamic language model to an object output stream.
LanguageModel.Conditional, LanguageModel.Dynamic, LanguageModel.Process, LanguageModel.Sequence, LanguageModel.Tokenized| Modifier and Type | Method and Description |
|---|---|
void |
train(char[] cs,
int start,
int end)
Update the model with the training data provided by
the specified character slice.
|
void |
train(char[] cs,
int start,
int end,
int count)
Update the model with the training data provided by the
specified character sequence with the specifiedc count.
|
void |
train(CharSequence cs)
Update the model with the training data provided by the
specified character sequence with a count of one.
|
void |
train(CharSequence cs,
int count)
Update the model with the training data provided by the
specified character sequence with the specified count.
|
compileTolog2Estimate, log2Estimatehandlevoid train(CharSequence cs)
cs - The character sequence to use as training data.void train(CharSequence cs, int count)
train(cs,n) is equivalent
to calling train(cs) a total of n
times.cs - The character sequence to use as training data.count - Number of instances to train.void train(char[] cs,
int start,
int end)
cs - The underlying character array for the slice.start - Index of first character in the slice.end - Index of one plus the last character in the
training slice.IndexOutOfBoundsException - If the end index minus
one and the start index are not in the range of the
character slice.void train(char[] cs,
int start,
int end,
int count)
train(cs,n) is equivalent
to calling train(cs) a total of
n times.
Update the model with the training data provided by
the specified character slice.cs - The underlying character array for the slice.start - Index of first character in the slice.end - Index of one plus the last character in the
training slice.count - Number of instances to train.IndexOutOfBoundsException - If the end index minus
one and the start index are not in the range of the
character slice.Copyright © 2019 Alias-i, Inc.. All rights reserved.