Open ashuezy opened 6 years ago
Demo example will sooner or later lead to NullPointerException
JFastText.ProbLabel probLabel = jft.predictProba(entireData);//This is bound to throw NullPointerException
replace it with
List predictionList = jft.predictProba(entireData, 1); if(predictionList.size()>0)//check the size of output before fetching an item {
}
Demo example will sooner or later lead to NullPointerException
JFastText.ProbLabel probLabel = jft.predictProba(entireData);//This is bound to throw NullPointerException
replace it with
List predictionList = jft.predictProba(entireData, 1);
if(predictionList.size()>0)//check the size of output before fetching an item
{
}