public interface TemporalSemanticSpace extends SemanticSpace
SemanticSpace
Modifier and Type | Method and Description |
---|---|
Long |
endTime()
Returns the time for the latest semantics contained within this space.
|
SortedSet<Long> |
getTimeSteps(String word)
Returns the time steps in which the provided word occurs (optional
operation).
|
Vector |
getVector(String word)
Returns the provided word's semantic vector based on all temporal
occurrences.
|
Vector |
getVectorAfter(String word,
long startTime)
Returns the provided word's semantic vector based on all temporal
occurrences occurring on or after the provided timestamp (optional
operation).
|
Vector |
getVectorBefore(String word,
long endTime)
Returns the provided word's semantic vector based on all temporal
occurrences before the provided timestamp (optional operation).
|
Vector |
getVectorBetween(String word,
long startTime,
long endTime)
Returns the provided word's semantic vector based on all temporal
occurrences that happened on or after the start timestamp but before the
ending timestamp (optional operation).
|
void |
processDocument(BufferedReader document)
Processes the contents of the provided reader as a document, using the
current time as the timestamp.
|
void |
processDocument(BufferedReader document,
long timestamp)
Processes the contents of the provided buffer as a document, using the
provided timestamp as the date when the document was written.
|
Long |
startTime()
Returns the time for the earliest semantics contained within this space.
|
getSpaceName, getVectorLength, getWords, processSpace
void processDocument(BufferedReader document) throws IOException
processDocument
in interface SemanticSpace
document
- a reader that allows access to the text of the documentIOException
- if any error occurs while reading the documentvoid processDocument(BufferedReader document, long timestamp) throws IOException
document
- a reader that allows access to the text of the documenttimestamp
- the time at which the document was writtenIOException
- if any error occurs while reading the documentLong startTime()
Long endTime()
SortedSet<Long> getTimeSteps(String word)
word
- Vector getVectorAfter(String word, long startTime)
word
- a word in the semantic spacestartTime
- a UNIX timestamp that denotes the time after which all
occurrences of the provided word should be counted.null
if the word was not in the space.Vector getVectorBefore(String word, long endTime)
word
- a word in the semantic spaceendTime
- a UNIX timestamp that denotes the time before which all
occurrences of the provided would should be counted.null
if the word was not in the space.Vector getVectorBetween(String word, long startTime, long endTime)
word
- a word in the semantic spacestartTime
- a UNIX timestamp that denotes the time before which
no occurrences of the word should be counted.endTime
- a UNIX timestamp that denotes the time after which no
occurrences of the word should be counted.null
if the word was not in the space.IllegalArgumentException
- if startTime
> endTime
Vector getVector(String word)
getVector
in interface SemanticSpace
word
- a word that may be in the semantic spaceVector
for the provided word or null
if the
word was not in the space.Copyright © 2012. All Rights Reserved.