GATE
Version 3.1-2270

gate.lexicon
Class MutableLexicalKnowledgeBaseImpl

java.lang.Object
  extended by gate.util.AbstractFeatureBearer
      extended by gate.creole.AbstractResource
          extended by gate.creole.AbstractLanguageResource
              extended by gate.lexicon.MutableLexicalKnowledgeBaseImpl
All Implemented Interfaces:
LanguageResource, LexicalKnowledgeBase, Lexicon, MutableLexicalKnowledgeBase, Resource, FeatureBearer, NameBearer, Serializable
Direct Known Subclasses:
NLGLexiconImpl

public class MutableLexicalKnowledgeBaseImpl
extends AbstractLanguageResource
implements MutableLexicalKnowledgeBase

See Also:
Serialized Form

Field Summary
protected  List posTypes
           
protected  List synsets
           
protected  HashMap words
           
 
Fields inherited from class gate.creole.AbstractLanguageResource
dataStore, lrPersistentId
 
Fields inherited from class gate.creole.AbstractResource
name
 
Fields inherited from class gate.util.AbstractFeatureBearer
features
 
Fields inherited from interface gate.lexicon.Lexicon
POS_ADJECTIVE, POS_ADVERB, POS_CONJ, POS_NOUN, POS_OTHER, POS_TYPES, POS_VERB
 
Constructor Summary
MutableLexicalKnowledgeBaseImpl()
           
 
Method Summary
 void addPOSType(Object newPOSType)
           
 MutableLexKBSynset addSynset()
          add a new synset
 MutableWord addWord(String lemma)
          add a new word
 Object getLexiconId()
           
 Object[] getPOSTypes()
           
 Iterator getSynsets()
           
 Iterator getSynsets(Object pos)
          returns all synsets for a specific POS
 String getVersion()
          returns the lexicon version
 Resource init()
          Initialise this resource, and return it.
 List lookupWord(String lemma)
          returns list of WordSense-s for specific lemma
 List lookupWord(String lemma, Object pos)
          returns list of WordSense-s for specific lemma of the specified POS
 void removeSynset(MutableLexKBSynset synset)
           
 void removeWord(MutableWord theWord)
           
 void setLexiconId(Object Id)
           
 void setVersion(String newVersion)
          sets the lexicon version
 
Methods inherited from class gate.creole.AbstractLanguageResource
cleanup, getDataStore, getLRPersistenceId, getParent, isModified, setDataStore, setLRPersistenceId, setParent, sync
 
Methods inherited from class gate.creole.AbstractResource
checkParameterValues, getBeanInfo, getName, getParameterValue, getParameterValue, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners
 
Methods inherited from class gate.util.AbstractFeatureBearer
getFeatures, setFeatures
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gate.LanguageResource
getDataStore, getLRPersistenceId, getParent, isModified, setDataStore, setLRPersistenceId, setParent, sync
 
Methods inherited from interface gate.Resource
cleanup, getParameterValue, setParameterValue, setParameterValues
 
Methods inherited from interface gate.util.FeatureBearer
getFeatures, setFeatures
 
Methods inherited from interface gate.util.NameBearer
getName, setName
 

Field Detail

synsets

protected List synsets

words

protected HashMap words

posTypes

protected List posTypes
Constructor Detail

MutableLexicalKnowledgeBaseImpl

public MutableLexicalKnowledgeBaseImpl()
Method Detail

init

public Resource init()
              throws ResourceInstantiationException
Description copied from class: AbstractResource
Initialise this resource, and return it.

Specified by:
init in interface Resource
Overrides:
init in class AbstractResource
Throws:
ResourceInstantiationException

getSynsets

public Iterator getSynsets()

getSynsets

public Iterator getSynsets(Object pos)
Description copied from interface: LexicalKnowledgeBase
returns all synsets for a specific POS

Specified by:
getSynsets in interface LexicalKnowledgeBase

lookupWord

public List lookupWord(String lemma)
Description copied from interface: LexicalKnowledgeBase
returns list of WordSense-s for specific lemma

Specified by:
lookupWord in interface LexicalKnowledgeBase

lookupWord

public List lookupWord(String lemma,
                       Object pos)
Description copied from interface: LexicalKnowledgeBase
returns list of WordSense-s for specific lemma of the specified POS

Specified by:
lookupWord in interface LexicalKnowledgeBase

addWord

public MutableWord addWord(String lemma)
add a new word

Specified by:
addWord in interface MutableLexicalKnowledgeBase

setVersion

public void setVersion(String newVersion)
sets the lexicon version

Specified by:
setVersion in interface MutableLexicalKnowledgeBase

getVersion

public String getVersion()
returns the lexicon version

Specified by:
getVersion in interface LexicalKnowledgeBase

addSynset

public MutableLexKBSynset addSynset()
Description copied from interface: MutableLexicalKnowledgeBase
add a new synset

Specified by:
addSynset in interface MutableLexicalKnowledgeBase

getPOSTypes

public Object[] getPOSTypes()
Specified by:
getPOSTypes in interface LexicalKnowledgeBase

addPOSType

public void addPOSType(Object newPOSType)
Specified by:
addPOSType in interface MutableLexicalKnowledgeBase

removeWord

public void removeWord(MutableWord theWord)
Specified by:
removeWord in interface MutableLexicalKnowledgeBase

removeSynset

public void removeSynset(MutableLexKBSynset synset)
Specified by:
removeSynset in interface MutableLexicalKnowledgeBase

getLexiconId

public Object getLexiconId()
Specified by:
getLexiconId in interface Lexicon

setLexiconId

public void setLexiconId(Object Id)
Specified by:
setLexiconId in interface Lexicon

GATE
Version 3.1-2270