gate.lexicon
Class MutableLexicalKnowledgeBaseImpl
java.lang.Object
gate.util.AbstractFeatureBearer
gate.creole.AbstractResource
gate.creole.AbstractLanguageResource
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
Methods inherited from class gate.creole.AbstractResource |
checkParameterValues, getBeanInfo, getName, getParameterValue, getParameterValue, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
synsets
protected List synsets
words
protected HashMap words
posTypes
protected List posTypes
MutableLexicalKnowledgeBaseImpl
public MutableLexicalKnowledgeBaseImpl()
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