diff --git a/src/main/java/com/hankcs/hanlp/mining/word2vec/VectorsReader.java b/src/main/java/com/hankcs/hanlp/mining/word2vec/VectorsReader.java index c78722f34..56425ff22 100644 --- a/src/main/java/com/hankcs/hanlp/mining/word2vec/VectorsReader.java +++ b/src/main/java/com/hankcs/hanlp/mining/word2vec/VectorsReader.java @@ -1,5 +1,7 @@ package com.hankcs.hanlp.mining.word2vec; +import com.hankcs.hanlp.corpus.io.IOUtil; + import java.io.*; import java.nio.charset.Charset; import static com.hankcs.hanlp.utility.Predefine.logger; @@ -27,7 +29,7 @@ public void readVectorFile() throws IOException BufferedReader br = null; try { - is = new FileInputStream(file); + is = IOUtil.newInputStream(file); r = new InputStreamReader(is, ENCODING); br = new BufferedReader(r);