Commit 4db018ee authored by Dorinela Dascalu's avatar Dorinela Dascalu 🌺

word2vec training file separator bug

parent 91777d7c
......@@ -191,7 +191,7 @@ public class Word2VecModel implements ISemanticModel {
public static void trainModel(String inputFile, int noEpochs, int layerSize) throws FileNotFoundException {
if (!inputFile.startsWith("resources")) {
if (inputFile.contains("resources" + File.separatorChar)) {
inputFile = inputFile.replaceAll(".*resources", "resources").replaceAll(File.separator, "/");
inputFile = inputFile.replaceAll(".*resources", "resources").replaceAll("[\\\\/]", "/");
}
else {
inputFile = inputFile.replaceAll(".*ReaderBench\\/", "resources/");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment