Package ai.djl.fasttext.jni
Class FtWrapper
java.lang.Object
ai.djl.util.NativeResource<Long>
ai.djl.fasttext.jni.FtWrapper
- All Implemented Interfaces:
AutoCloseable
A class containing utilities to interact with the fastText JNI layer.
-
Field Summary
Fields inherited from class ai.djl.util.NativeResource
handle -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckModel(String modelFilePath) voidclose()float[]getWordVector(String word) voidstatic FtWrapperai.djl.modality.ClassificationspredictProba(String text, int topK, String labelPrefix) voidvoidMethods inherited from class ai.djl.util.NativeResource
getHandle, getUid, isReleased, onClose
-
Method Details
-
newInstance
-
loadModel
-
checkModel
-
unloadModel
public void unloadModel() -
getModelType
-
predictProba
-
getWordVector
-
runCmd
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classai.djl.util.NativeResource<Long>
-