public class VectorStore
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
disconnect()
Disconnects the database.
|
boolean |
exists(java.lang.String word)
Checks, if the word is in the database
|
static VectorStore |
getInstance()
Initializes or retrieves the VectorStore
|
java.lang.String[] |
getKnownWords(java.lang.String text)
Return all known word in the text
|
java.lang.String[] |
getMissingWords(java.lang.String text)
Return all unknown word in the text
|
java.util.ArrayList<java.lang.String> |
getMissingWordsList(java.lang.String text) |
SemanticVector |
getUnweightedSemanticVector(java.lang.String text)
The pure SemanticVector for a the text is computed by adding the vectors of all single words.
|
SemanticVector |
getWeightedSemanticVector(java.lang.String text)
The SemanticVector for a the text is computed by adding the vectors of all single words.
|
SemanticVector |
getWord(java.lang.String word)
Retrieves the vector for a specific word
|
boolean |
isConnected()
Checks, if the connection to the database is still open
|
static void |
setPath(java.lang.String directory)
Please set up the path to the directory file before doing any computations.
|
public static VectorStore getInstance()
public static void setPath(java.lang.String directory)
directory
- the directory, where all other database files residepublic SemanticVector getWord(java.lang.String word)
word
- The wordpublic void disconnect()
public boolean isConnected()
public SemanticVector getWeightedSemanticVector(java.lang.String text)
text
- The text, for which the vector should be computedpublic SemanticVector getUnweightedSemanticVector(java.lang.String text)
text
- The text, for which the vector should be computedpublic java.lang.String[] getMissingWords(java.lang.String text)
text
- the text to checkpublic java.lang.String[] getKnownWords(java.lang.String text)
text
- the text to checkpublic boolean exists(java.lang.String word)
word
- the word to checkpublic java.util.ArrayList<java.lang.String> getMissingWordsList(java.lang.String text)