blob: 345c041d21292c394d40f0b0bf5b6a5079848d98 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.search.intent.model;
/**
* An intent in an intent model tree. The intent node score is the <i>probability</i> of this intent
* given the parent interpretation.
*
* @author bratseth
*/
public class IntentNode extends ParentNode<SourceNode> {
private Intent intent;
public IntentNode(Intent intent,double probabilityScore) {
super(probabilityScore);
this.intent=intent;
}
/** Returns the intent of this node, this is never null */
public Intent getIntent() { return intent; }
public void setIntent(Intent intent) { this.intent=intent; }
/** Returns intent:probability */
@Override
public String toString() {
return intent + ":" + getScore();
}
}
|