Synset.java |
1 /* 2 * Synset.java 3 * 4 * Copyright (c) 1998-2005, The University of Sheffield. 5 * 6 * This file is part of GATE (see http://gate.ac.uk/), and is free 7 * software, licenced under the GNU Library General Public License, 8 * Version 2, June 1991 (in the distribution as file licence.html, 9 * and also available at http://gate.ac.uk/gate/licence.html). 10 * 11 * Marin Dimitrov, 16/May/2002 12 * 13 * $Id: Synset.java,v 1.9 2005/01/11 13:51:38 ian Exp $ 14 */ 15 16 package gate.wordnet; 17 18 import java.util.List; 19 20 21 /** Represents WordNet synset. 22 */ 23 public interface Synset { 24 25 /** returns the part-of-speech for this synset, see WordNet::POS_XXX constants */ 26 public int getPOS(); 27 28 /** is this synset a UB - i.e. has no hypernym */ 29 public boolean isUniqueBeginner() throws WordNetException; 30 31 /** textual description of the synset */ 32 public String getGloss(); 33 34 /** offset in index files */ 35 public long getOffset(); 36 37 /** WordSenses contained in this synset */ 38 public List getWordSenses(); 39 40 /** get specific WordSense according to its order in the synset - most important senses come first */ 41 public WordSense getWordSense(int offset); 42 43 /** get the SemanticRelation-s of this synset */ 44 public List getSemanticRelations() throws WordNetException; 45 46 /** get the SemanticRelation-s of specific type (HYPERNYm) for this synset */ 47 public List getSemanticRelations(int type) throws WordNetException; 48 49 } 50 51