//printRank, added by Limin Yao
public void printRank (PrintWriter out)
{
final Alphabet dict = getAlphabet();
final LabelAlphabet labelDict = getLabelAlphabet();
int numFeatures = dict.size() + 1;
int numLabels = labelDict.size();
// Include the feature weights according to each label
RankedFeatureVector rfv;
double[] weights = new double[numFeatures-1]; // do not deal with the default feature
for (int li = 0; li < numLabels; li++) {
out.print ("FEATURES FOR CLASS "+labelDict.lookupObject (li) + " ");
for (int i = 0; i < defaultFeatureIndex; i++) {
double weight = parameters [li*numFeatures + i];
weights[i] = weight;
}
rfv = new RankedFeatureVector(dict,weights);