You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
你好,我用google训练好的二进制bin模型,在Word2vec.java的readFloat方法中报错,byte[] bytes = new byte[4]行内存溢出,改为byte[50]后readString()byte b = dis.readByte()报错java.io.EOFException
继续修改MAX_SIZE至100还是不行。请问是什么问题呢?
使用时遇到一个奇怪的bug,在Eclipse中能运行成功,maven打成jar包放在控制台里运行模型就无法向量化词语了,经过不断调试发现以下解决方案
在Word2vec.java的readString方法中
sb.append(new String(bytes));
和
sb.append(new String(bytes, 0, i + 1));
改为
sb.append(new String(bytes, "UTF-8"));
和
sb.append(new String(bytes, 0, i + 1, "UTF-8"));
The text was updated successfully, but these errors were encountered: