|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpitt.search.semanticvectors.VectorStoreWriter
public class VectorStoreWriter
This class provides methods for serializing a VectorStore to disk.
The serialization currently presumes that the object (in the ObjectVectors) should be serialized as a String.
The implementation uses Lucene's I/O package, which proved much faster than the native java.io.DataOutputStream.
In the current implementation, VectorStoreWriter objects have no internal fields, since vecLength is now a global variable. The writing methods could therefore be made static and done without instantiation; we've left the current (slightly awkward looking) instance method approach for now to see if the current implementation of vecLength and writers holds up in practice.
ObjectVector
Constructor Summary | |
---|---|
VectorStoreWriter()
Empty constructor method to give you a notional "instance" from which to call class methods. |
Method Summary | |
---|---|
boolean |
WriteVectors(java.lang.String vectorFileName,
VectorStore objectVectors)
|
boolean |
WriteVectorsAsText(java.lang.String vectorTextFile,
VectorStore objectVectors)
Outputs a vector store as a plain text file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VectorStoreWriter()
Method Detail |
---|
public boolean WriteVectors(java.lang.String vectorFileName, VectorStore objectVectors)
vectorFileName
- The name of the file to write toobjectVectors
- The vector store to be written to diskpublic boolean WriteVectorsAsText(java.lang.String vectorTextFile, VectorStore objectVectors)
vectorTextFile
- The name of the file to write toobjectVectors
- The vector store to be written to disk
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |