com.sun.labs.minion.knowledge
Class CombinedKnowledgeSource
java.lang.Object
com.sun.labs.minion.knowledge.CombinedKnowledgeSource
- All Implemented Interfaces:
- CompositeKnowledgeSource, KnowledgeSource, com.sun.labs.util.props.Component, com.sun.labs.util.props.Configurable
public class CombinedKnowledgeSource
- extends java.lang.Object
- implements CompositeKnowledgeSource
This class encapsulates a policy whereby the union of variants of all
the knowledge sources are combined.
Method Summary |
void |
addSource(KnowledgeSource aSource)
Add a KnowledgeSource. |
void |
newProperties(com.sun.labs.util.props.PropertySheet ps)
|
java.util.Set<java.lang.String> |
variantsOf(java.lang.String term)
Combine the variants of all the knowledge sources (eliminating duplicates) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sources
protected java.util.Set<KnowledgeSource> sources
CombinedKnowledgeSource
public CombinedKnowledgeSource()
addSource
public void addSource(KnowledgeSource aSource)
- Description copied from interface:
CompositeKnowledgeSource
- Add a KnowledgeSource.
- Specified by:
addSource
in interface CompositeKnowledgeSource
variantsOf
public java.util.Set<java.lang.String> variantsOf(java.lang.String term)
- Combine the variants of all the knowledge sources (eliminating duplicates)
- Specified by:
variantsOf
in interface KnowledgeSource
- Returns:
- a Set of words that are variations of
term
.
newProperties
public void newProperties(com.sun.labs.util.props.PropertySheet ps)
throws com.sun.labs.util.props.PropertyException
- Specified by:
newProperties
in interface com.sun.labs.util.props.Configurable
- Throws:
com.sun.labs.util.props.PropertyException