-
Notifications
You must be signed in to change notification settings - Fork 0
/
FeatureData.java
84 lines (68 loc) · 1.89 KB
/
FeatureData.java
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
package edu.berkeley.nlp.assignments.rerank.student;
import java.util.HashMap;
import java.util.List;
import edu.berkeley.nlp.ling.Tree;
import edu.berkeley.nlp.util.IntCounter;
/*
* This class provides the basic structure for datum.
* SVM learner and the LossAugmentedLinearModel uses this.
*/
public class FeatureData
{
private IntCounter goldFeatures;
//private boolean kBestLoss[];
private double kBestLoss[];
private int[][] kFeatures;
//private IntCounter kBestFeatures[];
//private Tree<String> goldTree;
//private List<Tree<String>> kParseTrees;
//private List<IntCounter> kBestFeatures;
public FeatureData(IntCounter goldFeatures, double[] kBestLoss, int[][] kBestFeatures)
{
this.setGoldFeatures(goldFeatures);
this.setkBestLoss(kBestLoss);
this.setkBestFeatures(kBestFeatures);
//this.setkBestFeatures(kBestFeatures);
//this.setkParseTreeFeatures(kParseTreeFeatures);
//this.setGoldTree(goldTree);
//this.setkPar seTrees(kParseTrees);
}
public int[][] getkBestFeatures() {
return kFeatures;
}
public void setkBestFeatures(int[][] kBestFeatures) {
this.kFeatures = kBestFeatures;
}
public IntCounter getGoldFeatures() {
return goldFeatures;
}
public void setGoldFeatures(IntCounter goldFeatures) {
this.goldFeatures = goldFeatures;
}
public double[] getkBestLoss() {
return kBestLoss;
}
public void setkBestLoss(double kBestLoss[]) {
this.kBestLoss = kBestLoss;
}
/*
public List<Tree<String>> getkParseTrees() {
return kParseTrees;
}
public void setkParseTrees(List<Tree<String>> kParseTrees) {
this.kParseTrees = kParseTrees;
}
public Tree<String> getGoldTree() {
return goldTree;
}
public void setGoldTree(Tree<String> goldTree) {
this.goldTree = goldTree;
}
public IntCounter[] getkBestFeatures() {
return kBestFeatures;
}
public void setkBestFeatures(IntCounter[] kBestFeatures) {
this.kBestFeatures = kBestFeatures;
}
*/
}