gov.llnl.ontology.wordnet.feature
Class OntologicalFeatureMaker

java.lang.Object
  extended by gov.llnl.ontology.wordnet.feature.OntologicalFeatureMaker

public class OntologicalFeatureMaker
extends Object

This class applies semantic vectors to every Synset that is reachable from some root Synset. This is an implementation of:

Pantel, P., "Inducing ontological co-occurrence vectors, " in Proceedings of the 43rd Annual Meeting on Association for Computational Linguistics

Given a 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 Synsets 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 Sysnets. 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.

Author:
Keith Stevens

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

OntologicalFeatureMaker

public OntologicalFeatureMaker(edu.ucla.sspace.common.SemanticSpace sspace)
Creates a new OntologicalFeatureMaker from a SemanticSpace. Feature weights for each term are assumed to be the sum of the term's features.


OntologicalFeatureMaker

public OntologicalFeatureMaker(edu.ucla.sspace.common.SemanticSpace sspace,
                               Map<String,Double> termWeights)
Creates a new 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

getAttributeName

public String getAttributeName()
Returns the string needed to access the feature vectors created.


induceOntologicalFeatures

public void induceOntologicalFeatures(Synset root)
Creates feature vectors for every Synset reachable by root.


applyOntologicalFeatures

public void applyOntologicalFeatures(Synset root,
                                     Set<Synset> leafNodes)
Recursively traverses the 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.



Copyright © 2010-2011. All Rights Reserved.