所以我有這樣的代碼,使用Weka中的Java API:秧雞的Java API stringtovector例外
String html = "blaaah";
Attribute input = new Attribute("html",(FastVector) null);
FastVector inputVec = new FastVector();
inputVec.addElement(input);
Instances htmlInst = new Instances("html",inputVec,1);
htmlInst.add(new Instance(1));
htmlInst.instance(0).setValue(0, html);
System.out.println(htmlInst);
StringToWordVector filter = new StringToWordVector();
filter.setInputFormat(htmlInst);
Instances dataFiltered = Filter.useFilter(htmlInst, filter);
,但是,filter.setInputFormat(htmlInst)線,Java的抱怨該函數拋出一個未處理的異常...
我做錯了什麼?