|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object leila.patterns.Linkage
public class Linkage
This class is part of LEILA (http://mpii.de/yago-naga/leila). It is licensed under the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0) by the author Fabian M. Suchanek (http://suchanek.name).
Linkage.java represents a sentence with its links. A linkage is constructed from an LGO-file (Link Grammar Output).
Field Summary | |
---|---|
protected java.util.List<LinkageWord> |
EMPTYLINKAGEWORDS
Empty sentence list |
int |
id
Identifies the sequence of words |
java.util.List<LinkageWord> |
linkageWords
words of the sentence in sentence order |
protected static int |
oldSentence
Contains last sentence to determine whether to call newDocument |
Constructor Summary | |
---|---|
protected |
Linkage()
For subclasses |
|
Linkage(java.util.List<java.lang.String> lines,
Document doc)
Constructs a linkage from a list of lines like |
Method Summary | |
---|---|
protected java.util.List<Link> |
find(LinkageWord w,
LinkageWord w2,
Link.Direction d)
Performs a depth-first search to find a bridge from one basis word to another |
int |
hashCode()
Returns a hashCode (Positive for normal Linkages) |
protected LinkagePattern |
linkagePattern(LinkageWord w,
LinkageWord w2,
Link.Direction d)
Returns a LinkagePattern for a pair of basis words, seeks only in one direction |
java.util.List<LinkagePattern> |
linkagePatterns(Relation r)
Returns a list of LinkagePatterns for all pairs of interesting words judged as EXAMPLEs by the relation |
java.lang.String |
toString()
Returns a String representation (for debugging) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static int oldSentence
public java.util.List<LinkageWord> linkageWords
protected java.util.List<LinkageWord> EMPTYLINKAGEWORDS
public int id
Constructor Detail |
---|
public Linkage(java.util.List<java.lang.String> lines, Document doc)
+---------------------Xp---------------------+ | +-------Ss------+ | +-----Wd----+----Bs---+ | | | +-Ds-+-Rn-+Sp*i+ +---Pv--+--Os-+ | | | | | | | | | | LEFT-WALL the man.n I.p saw.v was.v called.v Bob .
protected Linkage()
Method Detail |
---|
public java.util.List<LinkagePattern> linkagePatterns(Relation r)
protected LinkagePattern linkagePattern(LinkageWord w, LinkageWord w2, Link.Direction d)
protected java.util.List<Link> find(LinkageWord w, LinkageWord w2, Link.Direction d)
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |