edu.udo.cs.wvtool.generic.output
Class WordVectorWriter
java.lang.Object
edu.udo.cs.wvtool.generic.output.WordVectorWriter
- All Implemented Interfaces:
- WVTOutputFilter
public class WordVectorWriter
- extends java.lang.Object
- implements WVTOutputFilter
This class represents a mechanism, by which word vectors are stored to a
character stream. The format of the file is the following:
; ... ;
... ...
or, if you chose to store them in a sparse format:
; : : ... ...
- Version:
- $Id: WordVectorWriter.java,v 1.2 2006/06/06 11:45:24 mjwurst Exp $
- Author:
- Michael Wurst
Field Summary |
private java.io.PrintWriter |
out
|
private boolean |
sparse
|
Constructor Summary |
WordVectorWriter(java.io.Writer out,
boolean sparse)
Create a new instance of WordVectorFile |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
out
private final java.io.PrintWriter out
sparse
private final boolean sparse
WordVectorWriter
public WordVectorWriter(java.io.Writer out,
boolean sparse)
- Create a new instance of WordVectorFile
- Parameters:
out
- the stream to which to write the vectorssparse
- should the vectors be written in sparse format
write
public void write(WVTWordVector wv)
- Description copied from interface:
WVTOutputFilter
- Store a word vector.
- Specified by:
write
in interface WVTOutputFilter
- Parameters:
wv
- the word vector- See Also:
WVTOutputFilter.write(WVTWordVector)
close
public void close()