edu.udo.cs.wvtool.generic.output
Class WordVectorWriter

java.lang.Object
  extended by 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
 
Method Summary
 void close()
           
 void write(WVTWordVector wv)
          Store a word vector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

private final java.io.PrintWriter out

sparse

private final boolean sparse
Constructor Detail

WordVectorWriter

public WordVectorWriter(java.io.Writer out,
                        boolean sparse)
Create a new instance of WordVectorFile

Parameters:
out - the stream to which to write the vectors
sparse - should the vectors be written in sparse format

Method Detail

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()