gov.llnl.ontology.mains
Class ExtendWordNet

java.lang.Object
  extended by gov.llnl.ontology.mains.ExtendWordNet

public class ExtendWordNet
extends Object

Author:
Keith Stevens

Nested Class Summary
 class ExtendWordNet.ClassScores
          An internal struct class that maintains the of two words having a hypernym relationship and a cousin relationship within the wordnet hierarchy based on word co-occurrence information.
 class ExtendWordNet.Evidence
          A data struct for recording the co-occurrence information between two words and any class labels for the two words.
 
Constructor Summary
ExtendWordNet(OntologyReader wordnet, edu.ucla.sspace.dependency.DependencyExtractor extractor, edu.ucla.sspace.dv.DependencyPathBasisMapping basis, edu.ucla.sspace.dependency.DependencyTreeTransform transformer, WordNetBuilder wordnetBuilder, int numSimilarityScores)
          Constructs a new ExtendWordNet instance.
 
Method Summary
 void applySimilarityScores(int sspaceNum, edu.ucla.sspace.common.SemanticSpace sspace)
          Applies similarity scores for each of the word pairs in the evidence maps.
 void extendWordNet(OntologyReader wordnet)
           
 void gatherEvidence(BufferedReader document, Set<String> wordList)
          Iterates through the DependencyPath found in the dependency trees found in document.
 void labelUnknownEvidence()
          Compute the hypernym and cousin probabilities for each unknown noun pair.
static void main(String[] args)
           
 boolean trainModel(int numPasses)
          Trains the hypernym and cousin predictor models based on the evidence gathered for positive and negative relationships.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendWordNet

public ExtendWordNet(OntologyReader wordnet,
                     edu.ucla.sspace.dependency.DependencyExtractor extractor,
                     edu.ucla.sspace.dv.DependencyPathBasisMapping basis,
                     edu.ucla.sspace.dependency.DependencyTreeTransform transformer,
                     WordNetBuilder wordnetBuilder,
                     int numSimilarityScores)
Constructs a new ExtendWordNet instance.

Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

labelUnknownEvidence

public void labelUnknownEvidence()
Compute the hypernym and cousin probabilities for each unknown noun pair.


extendWordNet

public void extendWordNet(OntologyReader wordnet)

applySimilarityScores

public void applySimilarityScores(int sspaceNum,
                                  edu.ucla.sspace.common.SemanticSpace sspace)
Applies similarity scores for each of the word pairs in the evidence maps.


trainModel

public boolean trainModel(int numPasses)
Trains the hypernym and cousin predictor models based on the evidence gathered for positive and negative relationships. Returns true if both models could be trained.


gatherEvidence

public void gatherEvidence(BufferedReader document,
                           Set<String> wordList)
Iterates through the DependencyPath found in the dependency trees found in document. For any two nouns that are connected by some DependencyPath, the shortest path connecting these two nouns will be used as evidence.



Copyright © 2010-2011. All Rights Reserved.