Class DoublePredictionToCompute
- java.lang.Object
-
- org.predict4all.nlp.prediction.model.AbstractPredictionToCompute
-
- org.predict4all.nlp.prediction.model.DoublePredictionToCompute
-
- All Implemented Interfaces:
java.lang.Comparable<AbstractPredictionToCompute>
public class DoublePredictionToCompute extends AbstractPredictionToCompute
Represent the prediction for two word in a row.
Could have been generic (more than two, but for computing performance, limit combination to two word only)
-
-
Field Summary
-
Fields inherited from class org.predict4all.nlp.prediction.model.AbstractPredictionToCompute
correction, debugInformation, factor, prediction
-
-
Constructor Summary
Constructors Constructor Description DoublePredictionToCompute(int firstWordId, int secondWordId, boolean spaceBetween, int[] firstPrefix, int[] secondPrefix, double factor, boolean correction, java.lang.StringBuilder debugInformation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
computePrediction(WordDictionary wordDictionary)
int[]
getFirstPrefix()
int
getFirstWordId()
int[]
getSecondPrefix()
int
getSecondWordId()
int
getWordId()
boolean
isDouble()
boolean
isSpaceBetween()
-
Methods inherited from class org.predict4all.nlp.prediction.model.AbstractPredictionToCompute
compareTo, getDebugInformation, getFactor, getPrediction, getScore, isCorrection, isPredictionInitialized, setScore
-
-
-
-
Method Detail
-
getWordId
public int getWordId()
- Specified by:
getWordId
in classAbstractPredictionToCompute
-
getFirstPrefix
public int[] getFirstPrefix()
-
getSecondPrefix
public int[] getSecondPrefix()
-
getFirstWordId
public int getFirstWordId()
-
getSecondWordId
public int getSecondWordId()
-
isSpaceBetween
public boolean isSpaceBetween()
-
isDouble
public boolean isDouble()
- Specified by:
isDouble
in classAbstractPredictionToCompute
-
computePrediction
public void computePrediction(WordDictionary wordDictionary)
- Specified by:
computePrediction
in classAbstractPredictionToCompute
-
-