public abstract class BaseWordsi extends Object implements Wordsi, SemanticSpace
acceptedWords and dispatches calls to a ContextExtractor so that
Wordsi sub-classes will be called with each generated vector.| Constructor and Description |
|---|
BaseWordsi(Set<String> acceptedWords,
ContextExtractor extractor)
Creates a new
BaseWordsi. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptWord(String word)
Returns true if this
Wordsi implementation should generate a
semantic vector for word. |
String |
getSpaceName()
Returns a unique string describing the name and configuration of this
algorithm.
|
int |
getVectorLength()
Returns the length of vectors in this semantic space.
|
void |
processDocument(BufferedReader document)
Processes the contents of the provided file as a document.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleContextVectorgetVector, getWords, processSpacepublic BaseWordsi(Set<String> acceptedWords, ContextExtractor extractor)
BaseWordsi.acceptedWords - The set of words which Wordsi should
represent, may be null or empty.trackSecondaryKeys - If true, secondary key assignments will be
trackedpublic boolean acceptWord(String word)
Wordsi implementation should generate a
semantic vector for word.acceptWord in interface Wordsipublic String getSpaceName()
getSpaceName in interface SemanticSpacepublic int getVectorLength()
processSpace is called.getVectorLength in interface SemanticSpacepublic void processDocument(BufferedReader document)
processDocument in interface SemanticSpacedocument - a reader that allows access to the text of the documentCopyright © 2012. All Rights Reserved.