public class Grefenstette extends Object implements SemanticSpace
| Constructor and Description |
|---|
Grefenstette()
Constructs an instance using the system properties for any required
configuration
|
| Modifier and Type | Method and Description |
|---|---|
String |
getSpaceName()
Returns a unique string describing the name and configuration of this
algorithm.
|
Vector |
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)
Does nothing.
|
public Grefenstette()
IOError - if unable to create the backing file to hold data while
processingpublic void processDocument(BufferedReader document)
processDocument in interface SemanticSpacedocument - a reader that allows access to the text of the documentpublic Set<String> getWords()
getWords in interface SemanticSpacepublic Vector 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 void processSpace(Properties properties)
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 SemanticSpacepublic int getVectorLength()
processSpace is called.getVectorLength in interface SemanticSpaceCopyright © 2012. All Rights Reserved.