FastTextLibrary.LIB

Here are the examples of the java api FastTextLibrary.LIB taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

7 Examples 7

19 Source : FtWrapper.java
with Apache License 2.0
from awslabs

public void unloadModel() {
    FastTextLibrary.LIB.unloadModel(getHandle());
}

19 Source : FtWrapper.java
with Apache License 2.0
from awslabs

public String getModelType() {
    return FastTextLibrary.LIB.getModelType(getHandle());
}

19 Source : FtWrapper.java
with Apache License 2.0
from awslabs

public boolean checkModel(String modelFilePath) {
    return FastTextLibrary.LIB.checkModel(modelFilePath);
}

19 Source : FtWrapper.java
with Apache License 2.0
from awslabs

public void runCmd(String[] args) {
    FastTextLibrary.LIB.runCmd(args);
}

19 Source : FtWrapper.java
with Apache License 2.0
from awslabs

public float[] getDataVector(String word) {
    return FastTextLibrary.LIB.getWordVector(getHandle(), word);
}

19 Source : FtWrapper.java
with Apache License 2.0
from awslabs

public void loadModel(String modelFilePath) {
    FastTextLibrary.LIB.loadModel(getHandle(), modelFilePath);
}

18 Source : FtWrapper.java
with Apache License 2.0
from awslabs

/**
 * {@inheritDoc}
 */
@Override
public void close() {
    Long pointer = handle.getAndSet(null);
    if (pointer != null) {
        FastTextLibrary.LIB.freeFastText(pointer);
    }
}