Class GornAddressList

  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractSet
          extended byedu.upenn.cis.pdtb.util.ArraySet
              extended byedu.upenn.cis.pdtb.util.GornAddressList
All Implemented Interfaces:
java.util.Collection, java.util.Set, java.util.SortedSet

public class GornAddressList
extends ArraySet

A list of Gorn addresses. A Gorn address a1, a2,, an denotes the a_nth child of the an-1th child of .... the a2th child of the sentence number a1 in the associated PTB file. Given a PTB file with two sentences:

 ((S1 (A a) (B b)))
 ((S2 (C c) (D d)))

The Gorn address 0,0 refers to the node A. The Gorn address 1,1,0 refers to the node d. Note that 0 refers to S1, and 1 refers to S2 and not to the TOP node inserted by several APIs. Let G1, G2...Gn be Gorn addresses, then a Gorn address list is given by G1; G2...;Gn. A Gorn address list of length n denotes n nodes. In most cases, Gi is not a prefix (denoting an ancestor) of Gj for all 1 <= i,j <= n.

The implementation here sorts Gorn addresses according to an inorder traversal of the tree.


Field Summary
Fields inherited from class edu.upenn.cis.pdtb.util.ArraySet
fCheckLowerBound, fCheckUpperBound, fComparator, fLowerBound, fStore, fUpperBound
Constructor Summary
          Creates an empty GornAddressList
GornAddressList(java.lang.String gal)
          Instantiation from string representation.
Method Summary
 java.lang.String toString()
          Converts back to string form for serialization
Methods inherited from class edu.upenn.cis.pdtb.util.ArraySet
add, clear, comparator, contains, findLeastUpperBound, first, get, headSet, iterator, last, main, remove, search, size, subSet, tailSet
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, retainAll, toArray, toArray
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Set
addAll, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArray

Constructor Detail


public GornAddressList(java.lang.String gal)
Instantiation from string representation.

gal - A string representation of a GornAddressList


public GornAddressList()
Creates an empty GornAddressList

Method Detail


public java.lang.String toString()
Converts back to string form for serialization

toString in class ArraySet