Package com.yahoo.search.intent.model
Class IntentModel
java.lang.Object
com.yahoo.search.intent.model.Node
com.yahoo.search.intent.model.ParentNode<InterpretationNode>
com.yahoo.search.intent.model.IntentModel
- All Implemented Interfaces:
Comparable<Node>
This is the root node of an intent model.
The intent model represents the intent analysis of a query.
This is a probabilistic model - the query may have multiple interpretations with different probability.
Each interpretation may have multiple
possible intents, making this a tree.
- Author:
- bratseth
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.yahoo.processing.request.CompoundName
The name of the property carrying the intent model object: IntentModelstatic final com.yahoo.processing.request.CompoundName
The name of the property carrying the intent model string: intentModel -
Constructor Summary
ConstructorDescriptionCreates an empty intent modelIntentModel
(Interpretation... interpretations) Creates an intent model from some interpretationsIntentModel
(List<Interpretation> interpretations) Creates an intent model from some interpretations -
Method Summary
Modifier and TypeMethodDescriptionstatic IntentModel
Returns the intent model stored at property key "intentModel" in this query, or null if noneReturns the names of the sources returned fromgetSources()
for convenienceReturns a flattened list of sources with a normalized appropriateness of each, sorted by decreasing appropriateness.void
Stores this intent model at property key "intentModel" in this queryvoid
Sort interpretations by descending score orderMethods inherited from class com.yahoo.search.intent.model.ParentNode
children
-
Field Details
-
intentModelStringName
public static final com.yahoo.processing.request.CompoundName intentModelStringNameThe name of the property carrying the intent model string: intentModel -
intentModelObjectName
public static final com.yahoo.processing.request.CompoundName intentModelObjectNameThe name of the property carrying the intent model object: IntentModel
-
-
Constructor Details
-
IntentModel
public IntentModel()Creates an empty intent model -
IntentModel
Creates an intent model from some interpretations -
IntentModel
Creates an intent model from some interpretations
-
-
Method Details
-
sortChildren
public void sortChildren()Sort interpretations by descending score order -
getSources
Returns a flattened list of sources with a normalized appropriateness of each, sorted by decreasing appropriateness. This is obtained by summing the source appropriateness vectors of each intent node weighted by the owning intent and interpretation probabilities. Sources with a resulting probability of 0 is omitted in the returned list. -
getSourceNames
Returns the names of the sources returned fromgetSources()
for convenience -
getFrom
Returns the intent model stored at property key "intentModel" in this query, or null if none -
setTo
Stores this intent model at property key "intentModel" in this query
-