public double score(int[] featureVector, int currentTag)
    {
        double score = 0;
        for (int index : featureVector)
        {
            if (index == -1)
            {
                continue;
            }
            else if (index < -1 || index >= featureMap.size())
            {
                throw new IllegalArgumentException("在打分时传入了非法的下标");
            }
            else
            {
                index = index * featureMap.tagSet.size() + currentTag;
                score += parameter[index];    // 其实就是特征权重的累加
            }
        }
        return score;
    }
public double score ( int [ ] featureVector , int currentTag ) { double score = 0 ; for ( int index : featureVector ) { if ( index == - 1 ) { continue ; } else if ( index < - 1 || index >= featureMap . size ( ) ) { throw new IllegalArgumentException ( "在打分时传入了非法的下标" ) ; } else { index = index * featureMap . tagSet . size ( ) + currentTag ; score += parameter [ index ] ; } } return score ; }
通过命中的特征函数计算得分

@param featureVector 压缩形式的特征id构成的特征向量
@return