code: public void addEx(double weight, int x, int y, FeatureVector[] fvs) {
          if (numYs == -1) {
              numYs = fvs.length;
          }
          if (yAlphabet.size() > numYs) {
              throw new IllegalStateException("Y alphabet has grown larger than the number of Ys");
          }
          if (y >= numYs) {
              throw new IllegalArgumentException("Invalid y: " + y);
          } else if (fvs.length != numYs) {
              throw new IllegalArgumentException("Features must be given for all labels y");
          }        
          LogLinearExample ex = new LogLinearExample(weight, x, y, fvs);
          exList.add(ex);
      }
docs: Adds a new log-linear model instance.
  
  @param weight The weight of this example.
  @param x The observation, x.
  @param y The prediction, y.
  @param fvs The binary features on the observations, x, for all possible labels, y'. Indexed by y'.