gov.llnl.ontology.mains
Class CountTermsWithWordNetParents

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

public class CountTermsWithWordNetParents
extends Object

This main traverses Dependency Parsed documents in the CoNLL format and counts the number of times each noun in a sentence has one of it's WordNet parent terms in the sentence. It is assumed that if two words are in the sentence, they can be connected via some dependency path since all sentences are connected graphs. Optionally, these nouns can also be sorted into ascending or descending order and either all or only the top N can be emitted.

Author:
Keith Stevens

Constructor Summary
CountTermsWithWordNetParents(OntologyReader wordnet, edu.ucla.sspace.dependency.DependencyExtractor extractor)
           
 
Method Summary
static void main(String[] args)
           
 void printTerms(boolean orderWords, boolean orderAscending, int numRetainedWords)
           
 void processDocument(BufferedReader document)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CountTermsWithWordNetParents

public CountTermsWithWordNetParents(OntologyReader wordnet,
                                    edu.ucla.sspace.dependency.DependencyExtractor extractor)
Method Detail

processDocument

public void processDocument(BufferedReader document)
                     throws IOException
Throws:
IOException

printTerms

public void printTerms(boolean orderWords,
                       boolean orderAscending,
                       int numRetainedWords)

main

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


Copyright © 2010-2011. All Rights Reserved.