@Override public void addThruPipe(Instance inst) throws Exception { String str = (String) inst.getSource(); BinarySparseVector sv = (BinarySparseVector) inst.getData(); List<RETemplate> templates = new ArrayList<RETemplate>(); for (int i = 0; i < group.size(); i++) { RETemplate qt = group.get(i); float w = qt.matches(str); if (w > 0) { // System.out.println(qt.comment); int id = features.lookupIndex("template:" + qt.comment); sv.put(id); } } }