public class BasisMaker.OccurrenceCounter extends Object implements SemanticSpace
SemanticSpace implementation that counts word
co-occurrences, performs a transform, and then scores each recorded basis
dimension based on the row summed scores for each word.| Constructor and Description |
|---|
BasisMaker.OccurrenceCounter(Transform transform,
int bound,
int windowSize)
Creates a new
BasisMaker.OccurrenceCounter. |
| Modifier and Type | Method and Description |
|---|---|
String |
getSpaceName()
Returns a unique string describing the name and configuration of this
algorithm.
|
DoubleVector |
getVector(String word)
Returns the semantic vector for the provided word.
|
int |
getVectorLength()
Returns the length of vectors in this semantic space.
|
Set<String> |
getWords()
Returns the set of words that are represented in this semantic space.
|
void |
processDocument(BufferedReader document)
Processes the contents of the provided file as a document.
|
void |
processSpace(Properties properties)
Once all the documents have been processed, performs any post-processing
steps on the data.
|
public BasisMaker.OccurrenceCounter(Transform transform, int bound, int windowSize)
BasisMaker.OccurrenceCounter.public void processDocument(BufferedReader document) throws IOException
processDocument in interface SemanticSpacedocument - a reader that allows access to the text of the documentIOException - if any error occurs while reading the documentpublic Set<String> getWords()
getWords in interface SemanticSpacepublic DoubleVector getVector(String word)
getVector in interface SemanticSpaceword - a word that may be in the semantic spaceVector for the provided word or null if the
word was not in the space.public int getVectorLength()
processSpace is called.getVectorLength in interface SemanticSpacepublic void processSpace(Properties properties)
properties argument.
By general contract, once this method has been called, processDocument will not be called again.
processSpace in interface SemanticSpaceproperties - a set of properties and values that may be used to
configure any exposed parameters of the algorithm.public String getSpaceName()
getSpaceName in interface SemanticSpaceCopyright © 2012. All Rights Reserved.