Skip to content

Commit 7ef3c35

Browse files
author
Lukas Molzberger
committed
fix
1 parent 7b61d3d commit 7ef3c35

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/main/java/org/aika/corpus/Document.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public class Document implements Comparable<Document> {
9090

9191
public SearchNode rootSearchNode = new SearchNode(this, null, null, null, -1);
9292
public SearchNode selectedSearchNode = null;
93-
public ArrayList<Candidate> candidates;
93+
public ArrayList<Candidate> candidates = new ArrayList<>();
9494
public List<InterpretationNode> bestInterpretation = null;
9595

9696
public long createV;
@@ -197,14 +197,12 @@ public void generateCandidates() {
197197
act.visited = v;
198198
}
199199

200-
i = 0;
201-
candidates = new ArrayList<>();
202200
while (!tmp.isEmpty()) {
203201
int oldSize = tmp.size();
204202
for (Candidate c : tmp) {
205203
if (c.checkDependenciesSatisfied(v)) {
206204
tmp.remove(c);
207-
c.id = i++;
205+
c.id = candidates.size();
208206
candidates.add(c);
209207

210208
c.refinement.activation.visited = v;

0 commit comments

Comments
 (0)