|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcic.wordnet.Relation
public class Relation
Class to store a semantic relation contained in WordNet.
Field Summary | |
---|---|
(package private) java.lang.String |
pos
The POS tag for the related synset. |
(package private) java.lang.String |
sid
The synsetId of the related synset. sid is in the format "number_P". |
(package private) int |
source
Index of the source synset word related to this relation. |
(package private) int |
target
Index of the related synset word related to this relation. |
(package private) java.lang.String |
type
Corresponding relation type of the WNtype, e.g., "hypernym". |
(package private) java.lang.String |
WNtype
WordNet code of this relation, e.g., "@" for hypernyms. |
Constructor Summary | |
---|---|
Relation(java.lang.String WNType,
java.lang.String sid,
java.lang.String pos,
java.lang.String source_target)
Creates a relation from WordNet info. |
Method Summary | |
---|---|
java.lang.String |
getPos()
Returns the POS tag of the target synset. |
java.lang.String |
getSid()
Returns the synsetId of the target synset. |
int |
getSource()
Returns the index of the source synset word related to this relation. |
int |
getTarget()
Returns the index of the related synset word related to this relation. |
java.lang.String |
getType()
Returns the type of this relation. |
java.lang.String |
getWNtype()
Returns the WordNet code of this relation. |
java.lang.String |
toString()
Returns "has relation: synsetId". |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
java.lang.String WNtype
java.lang.String type
java.lang.String sid
java.lang.String pos
int source
int target
Constructor Detail |
---|
public Relation(java.lang.String WNType, java.lang.String sid, java.lang.String pos, java.lang.String source_target)
WNType
- Relation code.sid
- Target synsetId as found in WordNet.pos
- POS tag as found in WordNet.source_target
- source_target string.Method Detail |
---|
public java.lang.String getWNtype()
public java.lang.String getType()
public java.lang.String getSid()
public java.lang.String getPos()
public int getSource()
public int getTarget()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |