X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fsbp%2FForest.java;h=1b92a764458515ed750fb3fbe2d604f61944c717;hb=628b3a8eaafdbe8507e841076051bff42aadf5ee;hp=12c8cf18522bec0dbba93e44e26ec81d732185b8;hpb=fa858dc4acddd3e32126ff2558e0860315a84758;p=sbp.git diff --git a/src/edu/berkeley/sbp/Forest.java b/src/edu/berkeley/sbp/Forest.java index 12c8cf1..1b92a76 100644 --- a/src/edu/berkeley/sbp/Forest.java +++ b/src/edu/berkeley/sbp/Forest.java @@ -7,7 +7,10 @@ import java.util.*; import java.lang.reflect.*; /** an efficient representation of a collection of trees (Tomita's shared packed parse forest) */ -public abstract class Forest /*extends PrintableTree>*/ implements Visitable>, IntegerMappable, GraphViz.ToGraphViz { +public abstract class Forest /*extends PrintableTree>*/ + implements Visitable>, + IntegerMappable, + GraphViz.ToGraphViz { private static int master_idx = 0; private final int idx = master_idx++; @@ -156,6 +159,7 @@ public abstract class Forest /*extends PrintableTree>*/ impl * viewed, it becomes immutable */ static class Ref extends Forest { + public HashSet parents = new HashSet(); public boolean ambiguous() { if (hp.size()==0) return false; if (hp.size()==1) return hp.iterator().next().ambiguous();