edu.upenn.cis.pdtb
Class GornAddressList
java.lang.Object
java.util.AbstractCollection
java.util.AbstractSet
edu.upenn.cis.pdtb.util.ArraySet
edu.upenn.cis.pdtb.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-1, 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.
- Author:
- nikhild
|
Constructor Summary |
GornAddressList()
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 |
GornAddressList
public GornAddressList(java.lang.String gal)
- Instantiation from string representation.
- Parameters:
gal - A string representation of a GornAddressList
GornAddressList
public GornAddressList()
- Creates an empty GornAddressList
toString
public java.lang.String toString()
- Converts back to string form for serialization
- Overrides:
toString in class ArraySet