public class OpenNLPIntentMatcher
extends com.rabidgremlin.mutters.core.ml.AbstractMachineLearningIntentMatcher
Intent matcher that uses OpenNLP’s document classifier.
| Constructor and Description |
|---|
OpenNLPIntentMatcher(java.lang.String intentModel,
com.rabidgremlin.mutters.core.Tokenizer tokenizer,
com.rabidgremlin.mutters.core.SlotMatcher slotMatcher)
Constructor.
|
OpenNLPIntentMatcher(java.lang.String intentModel,
com.rabidgremlin.mutters.core.Tokenizer tokenizer,
com.rabidgremlin.mutters.core.SlotMatcher slotMatcher,
float minMatchScore,
float maybeMatchScore)
Constructor.
|
OpenNLPIntentMatcher(java.net.URL intentModelUrl,
com.rabidgremlin.mutters.core.Tokenizer tokenizer,
com.rabidgremlin.mutters.core.SlotMatcher slotMatcher,
float minMatchScore,
float maybeMatchScore)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.util.SortedMap<java.lang.Double,java.util.SortedSet<java.lang.String>> |
generateSortedScoreMap(java.lang.String[] utteranceTokens) |
public OpenNLPIntentMatcher(java.lang.String intentModel,
com.rabidgremlin.mutters.core.Tokenizer tokenizer,
com.rabidgremlin.mutters.core.SlotMatcher slotMatcher)
Constructor. Sets up the matcher to use the specified model (on the classpath) and specified tokenizer. Defaults to min score match of MIN_MATCH_SCORE and no maybe intent matching.
intentModel - The name of the document categoriser model file to use. This file must be on the classpath.tokenizer - The tokenizer to use when tokenizing an utterance.slotMatcher - The slot matcher to use to extract slots from the utterance.public OpenNLPIntentMatcher(java.lang.String intentModel,
com.rabidgremlin.mutters.core.Tokenizer tokenizer,
com.rabidgremlin.mutters.core.SlotMatcher slotMatcher,
float minMatchScore,
float maybeMatchScore)
Constructor. Sets up the matcher to use the specified model (on the classpath) and specifies the minimum and maybe match scores.
intentModel - The name of the document categoriser model file to use. This file must be on the classpath.minMatchScore - The minimum match score for an intent match to be considered good.maybeMatchScore - The maybe match score. Use -1 to disable maybe matching.tokenizer - The tokenizer to use when tokenizing an utterance.slotMatcher - The slot matcher to use to extract slots from the utterance.public OpenNLPIntentMatcher(java.net.URL intentModelUrl,
com.rabidgremlin.mutters.core.Tokenizer tokenizer,
com.rabidgremlin.mutters.core.SlotMatcher slotMatcher,
float minMatchScore,
float maybeMatchScore)
Constructor. Sets up the matcher to use the specified model (via a URL) and specifies the minimum and maybe match score.
intentModelUrl - A URL pointing at the document categoriser model file to load.minMatchScore - The minimum match score for an intent match to be considered good.maybeMatchScore - The maybe match score. Use -1 to disable maybe matching.tokenizer - The tokenizer to use when tokenizing an utterance.slotMatcher - The slot matcher to use to extract slots from the utterance.