germanet
Class Synset

java.lang.Object
  extended by germanet.Synset

public class Synset
extends java.lang.Object

A Synset belongs to a WordClass (WordClass.adj, WordClass.nomen, WordClass.verben) and consists of Lists of LexUnits, Frames, paraphrases (Strings), and Examples. The List of LexUnits is never empty, but any of the others may be.
A Synset also has the conceptual relations (of which hyperonymy, hyponymy, meronymy, and holonymy are transitive):

ConRel.hyperonymy, ConRel.hyponymy,
ConRel.meronymy, ConRel.holonymy,
ConRel.entailment, ConRel.entailed,
ConRel.causation, ConRel.caused,
ConRel.association

Methods are provided to get the WordClass, attibution, Examples, Frames, paraphrases, and the LexUnits.

Conceptual relations can be retrieved:
   List<Synset> hyperonyms = aSynset.getRelations(ConRel.hyperonymy);

Transitive relations can be retrieved:
   List<List<Synset>> meronyms = aSynset.getTransRelations(ConRel.meronymy);
which returns a List of Lists, each representing the Synsets found at a depth.

Neighbors (all Synsets that are related to this one) can be retrieved:
   List<Synset> neighbors = aSynset.getRelations();

Unless otherwise stated, methods will return an empty List rather than null to indicate that no objects exist for the given request.

Version:
1.0
Author:
Marie Hinrichs (meh at sfs.uni-tuebingen.de)

Method Summary
 java.util.List<java.lang.String> getAllOrthForms()
          Return a List of all orthographic forms contained in all LexUnits of this Synset.
 java.util.List<Example> getExamples()
          Return a List of this Synset's Examples.
 java.util.List<Frame> getFrames()
          Return a List of this Synset's Frames.
 java.lang.String getID()
          Return the unique identifier for this Synset.
 java.util.List<LexUnit> getLexUnits()
          Return a List of this Synset's LexUnits.
 java.util.List<java.lang.String> getParaphrases()
          Return a List of this Synset's paraphrases.
 java.util.List<Synset> getRelations()
          Return a List of all of the Synsets that this Synset has any relation to.
 java.util.List<Synset> getRelations(ConRel type)
          Return a List of this Synset's relations of type type.
 java.util.List<java.util.List<Synset>> getTransRelations(ConRel type)
          Returns the transitive closure of all relations of type type to this Synset.
 WordClass getWordClass()
          Return the word class that this Synset belongs to.
 int numExamples()
          Return the number of Examples in this Synset.
 int numFrames()
          Return the number of Frames in this Synset.
 int numLexUnits()
          Return the number of LexUnits in this Synset.
 int numParaphrases()
          Return the number of paraphrases in this Synset.
 java.lang.String toString()
          Return a String representation of this Synset.
 java.lang.String xmlString()
          Return an xml String representation of this Synset.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getWordClass

public WordClass getWordClass()
Return the word class that this Synset belongs to.

Returns:
the word class that this Synset belongs to.

numLexUnits

public int numLexUnits()
Return the number of LexUnits in this Synset.

Returns:
the number of LexUnits in this Synset.

numParaphrases

public int numParaphrases()
Return the number of paraphrases in this Synset.

Returns:
the number of paraphrases in this Synset.

numFrames

public int numFrames()
Return the number of Frames in this Synset.

Returns:
the number of Frames in this Synset.

numExamples

public int numExamples()
Return the number of Examples in this Synset.

Returns:
the number of Examples in this Synset.

getID

public java.lang.String getID()
Return the unique identifier for this Synset.

Returns:
the unique identifier for this Synset as it appears in the data files.

getLexUnits

public java.util.List<LexUnit> getLexUnits()
Return a List of this Synset's LexUnits.

Returns:
a List of this Synset's LexUnits.

getAllOrthForms

public java.util.List<java.lang.String> getAllOrthForms()
Return a List of all orthographic forms contained in all LexUnits of this Synset.

Returns:
a List of all orthographic forms contained in all LexUnits of this Synset.

getParaphrases

public java.util.List<java.lang.String> getParaphrases()
Return a List of this Synset's paraphrases.

Returns:
a List of this Synset's paraphrases.

getExamples

public java.util.List<Example> getExamples()
Return a List of this Synset's Examples.

Returns:
a List of this Synset's Examples.

getFrames

public java.util.List<Frame> getFrames()
Return a List of this Synset's Frames.

Returns:
a List of this Synset's Frames.

getRelations

public java.util.List<Synset> getRelations(ConRel type)
Return a List of this Synset's relations of type type.

Parameters:
type - type of relations to retrieve.
Returns:
a List of this Synset's relations of type type. For example, hyperonyms of this Synset can be retrieved with the type ConRel.hyperonymy.

getTransRelations

public java.util.List<java.util.List<Synset>> getTransRelations(ConRel type)
Returns the transitive closure of all relations of type type to this Synset. A List of Lists of Synsets is returned, where the List at position 0 contains this Synset, the List at position 1 contains the relations at depth 1, the List at position 2 contains the relations at depth 2, and so on up to the maximum depth. The size of the List returned indicates the maximum depth.
Returns an empty List if type is not transitive.

Parameters:
type - the type of relation (eg ConRel.hyperonymy).
Returns:
the transitive closure of all relations of type type - a List of Lists of Synsets.

getRelations

public java.util.List<Synset> getRelations()
Return a List of all of the Synsets that this Synset has any relation to.

Returns:
a List of all of the Synsets that this Synset has any relation to.

xmlString

public java.lang.String xmlString()
Return an xml String representation of this Synset.

Returns:
an xml String representation of this Synset.

toString

public java.lang.String toString()
Return a String representation of this Synset.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of this Synset.