private FeatureVector loadFeatureVector(int block_id){
  int featurePosition=getIntFromByteBuffer(block_id,features);
  final int numFeatures=encoding.readId(features,featurePosition);
  featurePosition+=EncoderConfiguration.ID_SIZE;
  final FeatureVector featureVector=new FeatureVector();
  FloatEncoder encoder;
  String featureName;
  for (int i=0; i < numFeatures; i++) {
    final int innerId=encoding.readId(features,featurePosition);
    final int outerId=encoding.outerId(innerId);
    encoder=encoding.encoder(innerId);
    featureName=Vocabulary.word(outerId);
    final float value=encoder.read(features,featurePosition);
    try {
      int index=Integer.parseInt(featureName);
      featureVector.increment(index,-value);
    }
 catch (    NumberFormatException e) {
      featureVector.increment(featureName,value);
    }
    featurePosition+=EncoderConfiguration.ID_SIZE + encoder.size();
  }
  return featureVector;
}

private FeatureVector loadFeatureVector ( int block_id ) { int featurePosition = getIntFromByteBuffer ( block_id , features ) ; final int numFeatures = encoding . readId ( features , featurePosition ) ; featurePosition += EncoderConfiguration . ID_SIZE ; final FeatureVector featureVector = new FeatureVector ( ) ; FloatEncoder encoder ; String featureName ; for ( int i = 0 ; i < numFeatures ; i ++ ) { final int innerId = encoding . readId ( features , featurePosition ) ; final int outerId = encoding . outerId ( innerId ) ; encoder = encoding . encoder ( innerId ) ; featureName = Vocabulary . word ( outerId ) ; final float value = encoder . read ( features , featurePosition ) ; try { int index = Integer . parseInt ( featureName ) ; featureVector . increment ( index , - value ) ; } catch ( NumberFormatException e ) { featureVector . increment ( featureName , value ) ; } featurePosition += EncoderConfiguration . ID_SIZE + encoder . size ( ) ; } return featureVector ; }
returns the featurevector associated with a rule ( represented as a block id ) . these features are in the form " feature1 = value feature2 = value . . . " . by default , unlabeled features are named using the pattern .
