anl.aida.sv
Class SVKeywordGenerator
java.lang.Object
anl.aida.sv.SVKeywordGenerator
- All Implemented Interfaces:
- KeywordGenerator
public class SVKeywordGenerator
- extends java.lang.Object
- implements KeywordGenerator
Generates keywords using the semantic vector package.
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 |
vectorStore
private SemanticVectorStore vectorStore
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.
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 forcount
- 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 againstcount
- the number of terms to return
- Returns:
- the found keywords.