code: public String[] getContext(Object o) {	
  	String sb = (String)((ObjectIntPair)o).a;
  	int id = ((ObjectIntPair)o).b;
  		
  	List preds = new ArrayList();
  	preds.add("p="+sb.substring(0,id));
  	preds.add("s="+sb.substring(id));
  	if (id>0) {
  	    addCharPreds("p1", sb.charAt(id-1), preds);
  	    if (id>1) {
  		addCharPreds("p2", sb.charAt(id-2), preds);
  		preds.add("p21="+sb.charAt(id-2)+sb.charAt(id-1));
  	    }
  	    else {
  	        preds.add("p2=bok");
  	    }
  	    preds.add("p1f1="+sb.charAt(id-1)+sb.charAt(id));
  	}
  	else {
  	    preds.add("p1=bok");
  	}
  	addCharPreds("f1",sb.charAt(id), preds);
  	if (id+1 < sb.length()) {
  	    addCharPreds("f2", sb.charAt(id+1), preds);
  	    preds.add("f12="+sb.charAt(id)+sb.charAt(id+1));
  	}
  	else {
  	    preds.add("f2=bok");
  	}
  	if (sb.charAt(0) == '&' && sb.charAt(sb.length()-1) == ';') {
  	  preds.add("cc");//character code
  	}
  
  	String[] context = new String[preds.size()];
  	preds.toArray(context);
  	return context;
      }
docs: Builds up the list of features based on the information in the Object,
  which is a pair containing a String and and Integer which
  indicates the index of the position we are investigating.