Package com.github.jfasttext
Class JFastText
- java.lang.Object
-
- com.github.jfasttext.JFastText
-
public class JFastText extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJFastText.ProbLabel
-
Constructor Summary
Constructors Constructor Description JFastText()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBucket()intgetContextWindowSize()intgetDim()intgetEpoch()StringgetLabelPrefix()List<String>getLabels()StringgetLossName()doublegetLr()intgetLrUpdateRate()intgetMaxn()intgetMinCount()intgetMinCountLabel()intgetMinn()StringgetModelName()intgetNLabels()intgetNSampledNegatives()intgetNWords()StringgetPretrainedVectorsFileName()doublegetSamplingThreshold()List<Float>getVector(String word)intgetWordNgrams()List<String>getWords()voidloadModel(String modelFile)static voidmain(String[] args)Stringpredict(String text)List<String>predict(String text, int k)JFastText.ProbLabelpredictProba(String text)List<JFastText.ProbLabel>predictProba(String text, int k)voidrunCmd(String[] args)voidtest(String testFile)voidtest(String testFile, int k)voidunloadModel()
-
-
-
Method Detail
-
runCmd
public void runCmd(String[] args)
-
loadModel
public void loadModel(String modelFile)
-
unloadModel
public void unloadModel()
-
test
public void test(String testFile)
-
test
public void test(String testFile, int k)
-
predictProba
public JFastText.ProbLabel predictProba(String text)
-
predictProba
public List<JFastText.ProbLabel> predictProba(String text, int k)
-
getNWords
public int getNWords()
-
getNLabels
public int getNLabels()
-
getLr
public double getLr()
-
getLrUpdateRate
public int getLrUpdateRate()
-
getDim
public int getDim()
-
getContextWindowSize
public int getContextWindowSize()
-
getEpoch
public int getEpoch()
-
getMinCount
public int getMinCount()
-
getMinCountLabel
public int getMinCountLabel()
-
getNSampledNegatives
public int getNSampledNegatives()
-
getWordNgrams
public int getWordNgrams()
-
getLossName
public String getLossName()
-
getModelName
public String getModelName()
-
getBucket
public int getBucket()
-
getMinn
public int getMinn()
-
getMaxn
public int getMaxn()
-
getSamplingThreshold
public double getSamplingThreshold()
-
getLabelPrefix
public String getLabelPrefix()
-
getPretrainedVectorsFileName
public String getPretrainedVectorsFileName()
-
main
public static void main(String[] args)
-
-