Skip to content

Commit

Permalink
removing obsolete models
Browse files Browse the repository at this point in the history
  • Loading branch information
nikit-srivastava committed Oct 18, 2018
1 parent 716efca commit 7521898
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 1,646 deletions.
2 changes: 0 additions & 2 deletions config/cfg.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ org.aksw.word2vecrestful.word2vec.Word2VecModelLoader.bin: true
org.aksw.word2vecrestful.word2vec.Word2VecFactory.model: data/GoogleNews-vectors-negative300.bin
org.aksw.word2vecrestful.Application.inmemory: true
org.aksw.word2vecrestful.Application.subsetfiledir: data/subset-files-1/
org.aksw.word2vecrestful.word2vec.normalizedmodel.bin: false
org.aksw.word2vecrestful.word2vec.normalizedmodel.model: data/normal/GoogleNews-vectors-negative300-normalized.txt
org.aksw.word2vecrestful.word2vec.normalizedbinmodel.bin: true
org.aksw.word2vecrestful.word2vec.normalizedbinmodel.model: data/normalbinmodel/GoogleNews-vectors-negative300-normalized.bin
org.aksw.word2vecrestful.word2vec.stats.sdfile: data/normal/stat/normal-model-sd.csv
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import java.util.Map.Entry;

import org.aksw.word2vecrestful.utils.Cfg;
import org.aksw.word2vecrestful.word2vec.W2VNrmlMemModelNonIndxd;
import org.aksw.word2vecrestful.word2vec.Word2VecFactory;
import org.aksw.word2vecrestful.word2vec.Word2VecModel;
import org.apache.commons.io.output.FileWriterWithEncoding;

import com.fasterxml.jackson.core.JsonProcessingException;
Expand Down Expand Up @@ -138,9 +138,9 @@ public static void generateSubsetFiles(File subsetConfig, String outputFileDir,
* @throws IOException
*/
public static void main(String[] args) throws JsonProcessingException, FileNotFoundException, IOException {
File subsetConfig = new File("D:\\Nikit\\DICE-Group\\word2vec-dump\\subsetconfig2.json");
W2VNrmlMemModelNonIndxd model = Word2VecFactory.getNormalizedBinNonIndxdModel();
generateSubsetFiles(subsetConfig, Cfg.get("org.aksw.word2vecrestful.Application.subsetfiledir"),
model.getWord2VecMap(), model.getVectorSize());
File subsetConfig = new File("word2vec-dump\\subsetconfig2.json");
Word2VecModel model = Word2VecFactory.getNormalBinModel();
generateSubsetFiles(subsetConfig, Cfg.get("org.aksw.word2vecrestful.Application.subsetfiledir"), model.word2vec,
model.vectorSize);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import java.util.Map.Entry;
import java.util.Set;

import org.aksw.word2vecrestful.word2vec.W2VNrmlMemModelNonIndxd;
import org.aksw.word2vecrestful.word2vec.Word2VecFactory;
import org.aksw.word2vecrestful.word2vec.Word2VecModel;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;

Expand Down Expand Up @@ -87,7 +87,7 @@ private static void writeValues(int index, float min, float max, float mean, flo
*/
public static void main(String[] args) throws JsonProcessingException, FileNotFoundException, IOException {
// Get the normalized model
W2VNrmlMemModelNonIndxd model = Word2VecFactory.getNormalizedBinNonIndxdModel();
writeModelStats(model.getWord2VecMap(), model.getVectorSize(), new File("data/normal/stat/normal-model-stats.csv"));
Word2VecModel model = Word2VecFactory.getNormalBinModel();
writeModelStats(model.word2vec, model.vectorSize, new File("data/normal/stat/normal-model-stats.csv"));
}
}

This file was deleted.

Loading

0 comments on commit 7521898

Please sign in to comment.