public class Word2VecLoader extends Object
Constructor and Description |
---|
Word2VecLoader() |
Modifier and Type | Method and Description |
---|---|
static float |
getFloat(byte[] b)
Read float from byte array, credit to:
Credit to: https://github.com/NLPchina/Word2VEC_java/blob/master/src/com/ansj/vec/Word2VEC.java
|
static Word2Vec |
loadGoogleBinary(String path)
Loads the google model
|
static float |
readFloat(InputStream is)
Credit to: https://github.com/NLPchina/Word2VEC_java/blob/master/src/com/ansj/vec/Word2VEC.java
|
public static Word2Vec loadGoogleBinary(String path) throws IOException
path
- the path to the google modelIOException
public static float readFloat(InputStream is) throws IOException
is
- IOException
public static float getFloat(byte[] b)
b
- Copyright © 2014. All rights reserved.