}
public void seekAlongPath(String type, int state, LatticeCell cell, List<LatticeCell> cellPath, List<String> repPath) {
//System.out.println("At state " + state);
Set<String> reps = cell.getReps(this);
RunAutomaton runAut = runAuts.get(type);
Set<String> newReps = new HashSet<String>();
for(String rep : reps) {
newReps.add(rep);
if(termVariants.containsKey(rep)) {
//System.out.println(rep + "\t" + termVariants.get(rep));
newReps.addAll(termVariants.get(rep));
}
}
reps = newReps;
//System.out.println("At state " + state);
//System.out.println(reps);
for(String rep : reps) {
//System.out.println("Now at state " + state);
String repCode = getRepForTokenOrNull(rep);
//System.out.println("NowNow at state " + state);
if(repCode != null) {
//System.out.println("Trying: " + type + "\t" + rep + "\t" + repCode + "\tat\t" + state);
int newState = state;
for(int i=0;i<repCode.length();i++) {
char c = repCode.charAt(i);
newState = runAut.step(newState, c);
//System.out.println("\t" + newState);
if(newState == -1) break;
}
if(newState == -1) continue;
//System.out.println("Added: " + type + "\t" + cell.getValue());
//System.out.println("Added: " + type + "\t" + repCode);
List<LatticeCell> newCellPath = new ArrayList<LatticeCell>(cellPath);
newCellPath.add(cell);
List<String> newRepPath = new ArrayList<String>(repPath);
newRepPath.add(rep);
if(runAut.isAccept(newState)) {
//System.out.println("Making new relation");
handleNe(type, newCellPath, newRepPath);// Handle the relation
}
if(cell.hasNext()) {
for(LatticeCell nextCell : cell.getNext()) {