|
NLGLexWordSenseImpl |
|
1 /* 2 * NLGLexWordSenseImpl.java 3 * 4 * Copyright (c) 1998-2003, 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 * Kalina Bontcheva, 21/February/2003 12 * 13 * $Id: NLGLexWordSenseImpl.java,v 1.1 2003/02/26 16:24:53 kalina Exp $ 14 */ 15 16 package gate.lexicon; 17 18 import java.util.HashMap; 19 import java.io.Serializable; 20 21 public class NLGLexWordSenseImpl extends MutableLexKBWordSenseImpl 22 implements NLGLexWordSense, Serializable { 23 24 protected HashMap extraLexInfo; 25 static final long serialVersionUID = -1049615572642010565L; 26 27 public NLGLexWordSenseImpl(Word myWord, MutableLexKBSynset mySynset, 28 int mySenseNumber, int myOrderInSynset) { 29 super(myWord, mySynset, mySenseNumber, myOrderInSynset); 30 extraLexInfo = new HashMap(); 31 } 32 33 public void setExtraInfo(HashMap newInfo) { 34 if (newInfo != null) 35 extraLexInfo = newInfo; 36 else 37 extraLexInfo.clear(); 38 } 39 40 public void addExtraInfo(String key, Object value) { 41 extraLexInfo.put(key, value); 42 } 43 44 public Object getExtraInfo(String key) { 45 return extraLexInfo.get(key); 46 } 47 48 public HashMap getExtraInfo() { 49 return extraLexInfo; 50 } 51 }
|
NLGLexWordSenseImpl |
|