|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knowceans.util.ArrayIo
org.knowceans.corpus.util.CorpusIo
public class CorpusIo
InputOutput reads and outputs binary matrices
| Field Summary | |
|---|---|
(package private) static java.lang.String |
shades
|
| Constructor Summary | |
|---|---|
CorpusIo()
|
|
| Method Summary | |
|---|---|
static char |
charDouble(double d,
double max)
create a string representation whose grey value appears as an indicator of magnitude, using one digit per element. |
private static double[][] |
read(java.lang.String filename)
|
(package private) static java.util.Vector<java.lang.String> |
readActorsList(java.lang.String file)
reads the actors list from a file with format name : id (on each line) |
(package private) static java.util.Vector<java.lang.String> |
readDocList(java.lang.String file)
reads the document names from a file |
static java.util.Vector<java.lang.String> |
readList(java.lang.String filename)
Read a list from the associated file name, depending on the type of file, the format is interpreted. |
(package private) static java.util.HashMap<java.lang.Integer,java.lang.String> |
readVocabulary(java.lang.String file)
reads the vocabulary from a file with format id = termstring (on each line) |
static void |
saveReadable(java.lang.String gibbsmodel)
|
static void |
saveShades(java.lang.String filename,
double[][] a,
double max,
java.lang.String comment,
boolean transposed,
java.lang.String additional)
save the matrix as a "shade" file, with optional additional information on the non-topics (that should be along rows). |
| Methods inherited from class org.knowceans.util.ArrayIo |
|---|
closeInputStream, closeOutputStream, formatDouble, loadBinaryMatrix, openInputStream, openOutputStream, padSpace, readAscii, readDoubleMatrix, readDoubleVector, readFloatMatrix, readFloatVector, readIntMatrix, readIntVector, saveAscii, saveBinaryMatrix, writeDoubleMatrix, writeDoubleVector, writeFloatMatrix, writeFloatVector, writeIntMatrix, writeIntVector |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static java.lang.String shades
| Constructor Detail |
|---|
public CorpusIo()
| Method Detail |
|---|
public static void saveReadable(java.lang.String gibbsmodel)
private static double[][] read(java.lang.String filename)
string -
public static char charDouble(double d,
double max)
d - valuemax - maximum value
public static void saveShades(java.lang.String filename,
double[][] a,
double max,
java.lang.String comment,
boolean transposed,
java.lang.String additional)
filename - target file namea - matrixmax - normalisationadditional - information about non-topics (put to row starts)public static java.util.Vector<java.lang.String> readList(java.lang.String filename)
filename -
static java.util.Vector<java.lang.String> readDocList(java.lang.String file)
throws java.io.IOException
java.io.IOException
static java.util.Vector<java.lang.String> readActorsList(java.lang.String file)
throws java.io.IOException
java.io.IOException
static java.util.HashMap<java.lang.Integer,java.lang.String> readVocabulary(java.lang.String file)
throws java.lang.NumberFormatException,
java.io.IOException
java.lang.NumberFormatException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||