|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection<E> java.util.AbstractList<E> java.util.ArrayList<TypedDependency> edu.stanford.nlp.trees.TypedDependencyList
public class TypedDependencyList
A TypedDependencyList
represents a complete list of
typed dependencies for a GrammaticalStructure
,
with special methods for printing in different formats.
GrammaticalStructure
,
GrammaticalRelation
,
EnglishGrammaticalStructure
,
Serialized FormField Summary |
---|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
TypedDependencyList()
|
|
TypedDependencyList(GrammaticalStructure gs)
The constructor builds a list of typed dependencies using information from a GrammaticalStructure . |
Method Summary | |
---|---|
void |
print()
Prints this set of typed dependencies to stdout . |
void |
print(PrintWriter pw)
Prints this set of typed dependencies to the specified PrintWriter . |
void |
print(String format)
Prints this set of typed dependencies to stdout
in the specified format. |
void |
print(String format,
PrintWriter pw)
Prints this set of typed dependencies to the specified PrintWriter in the specified format. |
void |
sort()
|
String |
toString()
Returns a String representation of this set of typed dependencies as exemplified by the following: |
String |
toString(String format)
Returns a String representation of the result of this set of typed dependencies in a user-specified format. |
Methods inherited from class java.util.ArrayList |
---|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
---|
equals, hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, removeAll, retainAll |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
Constructor Detail |
---|
public TypedDependencyList()
public TypedDependencyList(GrammaticalStructure gs)
GrammaticalStructure
.
Method Detail |
---|
public void sort()
public String toString(String format)
nsubj(died-1, Sam-0) tmod(died-1, today-2)
dependent
, relation
, and
governor
, as exemplified by the following:
Sam-0 nsubj died-1 today-2 tmod died-1
<dependencies> <dep type="nsubj"> <governor idx="1">died</governor> <dependent idx="0">Sam</dependent> </dep> <dep type="tmod"> <governor idx="1">died</governor> <dependent idx="2">today</dependent> </dep> </dependencies>
format
- a String
specifying the desired format
String
representation of the typed
dependencies in this GrammaticalStructure
public String toString()
tmod(died-6, today-9) nsubj(died-6, Sam-3)
toString
in class AbstractCollection<TypedDependency>
String
representation of this set of
typed dependenciespublic void print()
stdout
.
public void print(PrintWriter pw)
PrintWriter
.
public void print(String format)
stdout
in the specified format.
public void print(String format, PrintWriter pw)
PrintWriter
in the specified format.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |