public class IntentModel extends ParentNode<InterpretationNode>
Modifier and Type | Class and Description |
---|---|
(package private) static class |
IntentModel.InterpretationNodeComparator |
Modifier and Type | Field and Description |
---|---|
private static IntentModel.InterpretationNodeComparator |
inodeComp |
static com.yahoo.processing.request.CompoundName |
intentModelObjectName
The name of the property carrying the intent model object: IntentModel
|
static com.yahoo.processing.request.CompoundName |
intentModelStringName
The name of the property carrying the intent model string: intentModel
|
Constructor and Description |
---|
IntentModel()
Creates an empty intent model
|
IntentModel(Interpretation... interpretations)
Creates an intent model from some interpretations
|
IntentModel(List<Interpretation> interpretations)
Creates an intent model from some interpretations
|
Modifier and Type | Method and Description |
---|---|
static IntentModel |
getFrom(Query query)
Returns the intent model stored at property key "intentModel" in this query, or null if none
|
List<String> |
getSourceNames()
Returns the names of the sources returned from
getSources() for convenience |
List<SourceNode> |
getSources()
Returns a flattened list of sources with a normalized appropriateness of each, sorted by
decreasing appropriateness.
|
void |
setTo(Query query)
Stores this intent model at property key "intentModel" in this query
|
void |
sortChildren()
Sort interpretations by descending score order
|
addSources, children
compareTo, getScore, increaseScore, setScore
public static final com.yahoo.processing.request.CompoundName intentModelStringName
public static final com.yahoo.processing.request.CompoundName intentModelObjectName
private static final IntentModel.InterpretationNodeComparator inodeComp
public IntentModel()
public IntentModel(List<Interpretation> interpretations)
public IntentModel(Interpretation... interpretations)
public void sortChildren()
public List<SourceNode> getSources()
public List<String> getSourceNames()
getSources()
for conveniencepublic static IntentModel getFrom(Query query)
public void setTo(Query query)
Copyright © 2018. All rights reserved.