Package edu.stanford.nlp.sentiment
Class ConvertMatlabModel
- java.lang.Object
-
- edu.stanford.nlp.sentiment.ConvertMatlabModel
-
public class ConvertMatlabModel extends Object
This tool is of very limited scope: it converts a model built with the Matlab version of the code to the Java version of the code. It is useful to save this tool in case the format of the Java model changes, in which case this will let us easily recreate it.
Another set of matrices is in
/u/nlp/data/sentiment/binary/model_binary_best_asTextFiles/- Author:
- John Bauer
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcopyWordVector(Map<String,org.ejml.simple.SimpleMatrix> wordVectors, String source, String target)Will not overwrite an existing word vector if it is already therestatic org.ejml.simple.SimpleMatrixloadMatrix(String binaryName, String textName)static voidmain(String[] args)static voidreplaceWordVector(Map<String,org.ejml.simple.SimpleMatrix> wordVectors, String source, String target)Will overwrite an existing word vector
-
-
-
Method Detail
-
copyWordVector
public static void copyWordVector(Map<String,org.ejml.simple.SimpleMatrix> wordVectors, String source, String target)
Will not overwrite an existing word vector if it is already there
-
replaceWordVector
public static void replaceWordVector(Map<String,org.ejml.simple.SimpleMatrix> wordVectors, String source, String target)
Will overwrite an existing word vector
-
loadMatrix
public static org.ejml.simple.SimpleMatrix loadMatrix(String binaryName, String textName) throws IOException
- Throws:
IOException
-
main
public static void main(String[] args) throws IOException
- Throws:
IOException
-
-