|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.llnl.ontology.wordnet.feature.OntologicalFeatureMaker
public class OntologicalFeatureMaker
This class applies semantic vectors to every Synset
that is reachable
from some root Synset
. This is an implementation of:
SemanticSpace
and a root Synset
, this algorithm will
recursively traverse all nodes reachable by the root node. All leaf nodes
will be given a feature vector that is initially the semantic vector found in
the SemanticSpace
for any of the leaf Synset
's lemmas. After
all leaf nodes have been given a feature vector, parent nodes will get a
feature vector that is an fuzzy intersection of it's children's feature
vectors. Once every node has been given a feature vector, the leaf nodes are
disambiguated by setting any features shared by alternative Synset
's parent's feature vector to zero.
For example, if there were two Synset
s for "cat", one for feline pets
and one for cool guys, then the feature vector for the feline cat Synset
and feature vector for the cool guy Synset
would initially
share the same feature vector. If "pet" is the parent of feline cat, it
would get a feature vector that has all features shared by the feline cat
Synset
, a dog Synset
, and any other pet based Sysnet
s. Similarity for the parent of the cool guy Synset
. Then,
for any non zero feature in the parent of the cool guy Synset
that is
shared with the feline pet Synset
, the feature in the feline pet's
feature vector is set to 0, thus saving only the features relevant to feline
pets and dropping any features related to cool guys.
Constructor Summary | |
---|---|
OntologicalFeatureMaker(edu.ucla.sspace.common.SemanticSpace sspace)
Creates a new OntologicalFeatureMaker from a SemanticSpace . |
|
OntologicalFeatureMaker(edu.ucla.sspace.common.SemanticSpace sspace,
Map<String,Double> termWeights)
Creates a new OntologicalFeatureMaker from a SemanticSpace . |
Method Summary | |
---|---|
void |
applyOntologicalFeatures(Synset root,
Set<Synset> leafNodes)
Recursively traverses the Synset hierarchy based at root . |
String |
getAttributeName()
Returns the string needed to access the feature vectors created. |
void |
induceOntologicalFeatures(Synset root)
Creates feature vectors for every Synset reachable by root . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OntologicalFeatureMaker(edu.ucla.sspace.common.SemanticSpace sspace)
OntologicalFeatureMaker
from a SemanticSpace
.
Feature weights for each term are assumed to be the sum of the term's
features.
public OntologicalFeatureMaker(edu.ucla.sspace.common.SemanticSpace sspace, Map<String,Double> termWeights)
OntologicalFeatureMaker
from a SemanticSpace
.
If termWeight
is null, then feature weights for each term are
assumed to be the sum of the term's features. Otherwise, the values in
termWeights
are used.
Method Detail |
---|
public String getAttributeName()
public void induceOntologicalFeatures(Synset root)
Synset
reachable by root
.
public void applyOntologicalFeatures(Synset root, Set<Synset> leafNodes)
Synset
hierarchy based at root
.
Leaf nodes are given feature vectors from sspace
. Internal nodes
are given an intersection of features from their child nodes.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |