public void addValuedTrainingInstance(int id, String label, List<StringDoublePair> features) {
    List<scala.Tuple2<String,Double>> arr = new ArrayList<scala.Tuple2<String,Double>>();
    for (StringDoublePair pair : features) {
      arr.add(new scala.Tuple2<String,Double>(pair.getString(), pair.getDouble()));
    }
    maxent.addValuedInstance(new java.lang.Integer(id), label,arr);
  }
public void addValuedTrainingInstance ( int id , String label , List < StringDoublePair > features ) { List < scala . Tuple2 < String , Double > > arr = new ArrayList < scala . Tuple2 < String , Double > > ( ) ; for ( StringDoublePair pair : features ) { arr . add ( new scala . Tuple2 < String , Double > ( pair . getString ( ) , pair . getDouble ( ) ) ) ; } maxent . addValuedInstance ( new java . lang . Integer ( id ) , label , arr ) ; }
/*
@param id - an integer id that can be used to re-assign this classification instance
@param label - A string value that is the "gold standard" label for this training instance
@param features - A list of strings double pairs that correspond to the names of the features present for this training instance