T - The object type passed to the ObjectKeyGenerator provided at
construction time of Bigram object.public class Bigram<T extends SequenceEntry> extends Object implements NGram<T>
UsageModel from a set of
sequences. The model is generated using the bigram method, meaning that the
probability for each next state only depends on the previous state. Usage of
the class should be:
UsageModel using getModel() method.| Modifier and Type | Field and Description |
|---|---|
static String |
END_STATE_ID |
static String |
START_STATE_ID |
| Constructor and Description |
|---|
Bigram(String name,
ObjectKeyGenerator<T> keyGen)
Create a new
Bigram object. |
| Modifier and Type | Method and Description |
|---|---|
void |
addTrace(Sequence<T> seq)
Add a sequence to the ngram.
|
be.vibes.ts.UsageModel |
getModel()
Return the model inferred from the given sequences.
|
String |
getName()
Returns the name of the ngram.
|
public static final String START_STATE_ID
public static final String END_STATE_ID
public Bigram(String name, ObjectKeyGenerator<T> keyGen)
Bigram object.name - The name of the ngram.keyGen - The key generator used to generate the key corresponding to
each trace entry.public void addTrace(Sequence<T> seq)
NGramaddTrace in interface NGram<T extends SequenceEntry>seq - The sequence to add.public be.vibes.ts.UsageModel getModel()
NGramgetModel in interface NGram<T extends SequenceEntry>Copyright © 2014–2018 University of Namur. All rights reserved.