|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectde.pado.dv.SemanticSpaceArray
public class SemanticSpaceArray
This is a naive array-based implementation of the SemanticSpace interface. It is rather fast, but requires much memory (number(targets)*number(basis elements)*size(Double)).
| Method Summary | |
|---|---|
boolean |
containsBE(java.lang.String b)
Determines if the basis element b is used for representation in the semantic space. |
boolean |
containsTarget(java.lang.String t)
Determines if the target t is represented in the semantic space. |
void |
fillFromFile(java.lang.String matrixfilename)
Fill a semantic space with the data from a string represtation of the space in a file. |
double[] |
getVector(java.lang.String target)
Returns the vector representing the target as a double array. |
void |
increaseCount(java.lang.String target,
java.lang.String be,
double value)
Increases the co-occurrence count for a given target and basis element combination. |
void |
loglikelihood(double total)
Performs a log-likelihood transformation for all the cells in the space matrix. |
void |
setCount(java.lang.String target,
java.lang.String be,
double value)
Sets the co-occurrence count for a given target and basis element combination to some number. |
java.lang.String |
toString()
Returns a string representation of the SemanticSpace. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public void increaseCount(java.lang.String target,
java.lang.String be,
double value)
increaseCount in interface SemanticSpace
public void setCount(java.lang.String target,
java.lang.String be,
double value)
public void loglikelihood(double total)
public boolean containsTarget(java.lang.String t)
SemanticSpace
containsTarget in interface SemanticSpacepublic boolean containsBE(java.lang.String b)
SemanticSpace
containsBE in interface SemanticSpacepublic double[] getVector(java.lang.String target)
public java.lang.String toString()
toString in interface SemanticSpacetoString in class java.lang.Object
public void fillFromFile(java.lang.String matrixfilename)
throws java.io.IOException
java.io.IOException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||