anl.aida.sv
Class SVKeywordGenerator

java.lang.Object
  extended by anl.aida.sv.SVKeywordGenerator
All Implemented Interfaces:
KeywordGenerator

public class SVKeywordGenerator
extends java.lang.Object
implements KeywordGenerator

Generates keywords using the semantic vector package.


Nested Class Summary
private  class SVKeywordGenerator.Searcher
           
 
Field Summary
private  SemanticVectorStore vectorStore
           
 
Constructor Summary
SVKeywordGenerator(SemanticVectorStore vectorStore)
          Creates a KeywordGenerator using the specifed SemanticVectorStore.
 
Method Summary
 HighestTermScores generate(float[] vector, int count)
          Generates the specified number of keywords that are most similar to the specified vector.
 HighestTermScores generate(java.lang.String docPath, int count)
          Generates and returns the specified number of keywords for the document identified by the specified path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vectorStore

private SemanticVectorStore vectorStore
Constructor Detail

SVKeywordGenerator

public SVKeywordGenerator(SemanticVectorStore vectorStore)
                   throws java.io.IOException
Creates a KeywordGenerator using the specifed SemanticVectorStore.

Parameters:
vectorStore - the wrapper to use for SV access
Throws:
java.io.IOException - if there is an error reading the stores.
Method Detail

generate

public HighestTermScores generate(java.lang.String docPath,
                                  int count)
                           throws AIDAException
Generates and returns the specified number of keywords for the document identified by the specified path.

Specified by:
generate in interface KeywordGenerator
Parameters:
docPath - the path of the document to generate words for
count - the number of keywords to generate
Returns:
the collection of HighestTermScores
Throws:
AIDAException - if there is an error generating the keywords

generate

public HighestTermScores generate(float[] vector,
                                  int count)
Generates the specified number of keywords that are most similar to the specified vector.

Specified by:
generate in interface KeywordGenerator
Parameters:
vector - the vector to search against
count - the number of terms to return
Returns:
the found keywords.